Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref-assembly related warning from CompileXaml task #11032

Closed
maxkatz6 opened this issue Apr 17, 2023 · 10 comments · Fixed by #14014
Closed

Ref-assembly related warning from CompileXaml task #11032

maxkatz6 opened this issue Apr 17, 2023 · 10 comments · Fixed by #14014
Assignees

Comments

@maxkatz6
Copy link
Member

Describe the bug

Every project with xaml-compile task produces an warning:

 Could not extract the MVID from "obj\Release\net7.0\refint\SafeAreaDemo.dll". Are you sure it is a reference assembly?

Possibly, related to Cecil patching of ref assemblies with xaml generated members.
Also, possibly can be fixed by updating Cecil version (as there were somewhat related fixes on the github).
But there were no public releases since mid-2021, so we would end up using a submodule possibly.

To Reproduce
Steps to reproduce the behavior:

  1. Build a project with XAML
  2. See warning in the build log (not visible in the IDE warnings tab)
@maxkatz6 maxkatz6 added the bug label Apr 17, 2023
@HobbesKo
Copy link

I have also noticed this issue.

Is there any chance that this bug would increase the build time of a project?
It's now taking at least twice as long to build the same project, compared to before I updated to Preview 7.

@maxkatz6
Copy link
Member Author

@HobbesKo this issue existed since early preview4 at least. So unlikely to be new in preview7.

@HobbesKo
Copy link

HobbesKo commented Apr 26, 2023

Ah, OK.
I shall look elsewhere for the cause of the slow build.

Many thanks for the reply.

@HobbesKo
Copy link

I've reverted to Preview 6, which has cured my slow build issue.

I understand that Preview 7 has a ListBox problem. So maybe that's caused trouble for me.

@SuperJMN
Copy link
Contributor

This is hitting me as well. Could not extract the MVID from "obj/Release/refint/AvaloniaSyncer.dll". Are you sure it is a reference assembly?

AvaloniaSyncer uses Avalonia 11 (11.0.5)

@maxkatz6 maxkatz6 self-assigned this Nov 13, 2023
@maxkatz6 maxkatz6 added this to the 11.1 milestone Nov 13, 2023
@JaykeBird
Copy link

I've also encountered this issue.

I created a new project via Avalonia for Visual Studio, upgraded the NuGet packages to the latest version (11.0.6), and then removed the <OutputType>WinExe</OutputType> line from the csproj. Soon after that, this line started appearing in the output during builds.

It seems that everything is still successfully building, so I'm not too worried at the moment... but I don't understand what the message means, so I'm worried it will come back to bite me later.

@TcPirate1
Copy link

I've started learning Avalonia this week and ran into this problem trying to use code completion and previewer on Vs code as the extension requires the build to be completed but due to this error I can't use either features in Vs code.

Doesn't seem to be a problem with Visual Studio's extension (at least for me)

@maxkatz6
Copy link
Member Author

as the extension requires the build to be completed but due to this error I can't use either features in Vs code.

It's not an error, it shouldn't block the build. I don't think you can even make this warning to be an error.

@maxkatz6 maxkatz6 removed this from the 11.1 milestone Dec 19, 2023
@TcPirate1
Copy link

as the extension requires the build to be completed but due to this error I can't use either features in Vs code.

It's not an error, it shouldn't block the build. I don't think you can even make this warning to be an error.

Apologies, wrong word, it is indeed a warning.

Upon further investigation of the vs code features not working, it is related to the extension and not the app not building.

@timunie
Copy link
Contributor

timunie commented Dec 19, 2023

@TcPirate1 then open a discussion there with a minimal sample to reproduce. Make sure the ext. is up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants