Closed ghost1372 closed 1 day ago
Well, this doesn't happen with C++ class libraries. Given the NuGet path that it is in the provided message, I am assuming that this is a C# project. Is the C# class library building as AnyCpu? Does the error go away if you build for a specific platform?
Well, this doesn't happen with C++ class libraries. Given the NuGet path that it is in the provided message, I am assuming that this is a C# project. Is the C# class library building as AnyCpu? Does the error go away if you build for a specific platform?
Yes this is a c# project, No, Changing the platform has no effect and I still get the error
I also met this error when I upgraded to v1.6-exp2
, my solution is:
Microsoft.Web.WebView2
package:<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2646-prerelease" />
bin
and obj
folders<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2646-prerelease" />
not worked for me
Well, this doesn't happen with C++ class libraries. Given the NuGet path that it is in the provided message, I am assuming that this is a C# project. Is the C# class library building as AnyCpu? Does the error go away if you build for a specific platform?
Yes this is a c# project, No, Changing the platform has no effect and I still get the error
That wasn't quite what I asked.
When you create the C# Class Library, the project is initially configured for Any CPU.
What I was asking was, if you configure the project to use an actual platform, would it help with your problem.
Since I was in a position to test. First, I configured the class library to build as a specific platform, not Any CPU:
After doing this, the entire solution builds successfully.
But I would definitely think that this is an issue with the WebView2 NuGet package. It seems to be attempting to copy the projection and runtime unconditionally.
Well, this doesn't happen with C++ class libraries. Given the NuGet path that it is in the provided message, I am assuming that this is a C# project. Is the C# class library building as AnyCpu? Does the error go away if you build for a specific platform?
Yes this is a c# project, No, Changing the platform has no effect and I still get the error
That wasn't quite what I asked.
When you create the C# Class Library, the project is initially configured for Any CPU.
What I was asking was, if you configure the project to use an actual platform, would it help with your problem.
Since I was in a position to test. First, I configured the class library to build as a specific platform, not Any CPU:
After doing this, the entire solution builds successfully.
But I would definitely think that this is an issue with the WebView2 NuGet package. It seems to be attempting to copy the projection and runtime unconditionally.
@DarranRowe @hippieZhou Tnx i was doing wrong, after adding X86 Platform, Class Library Builds successfully, however this should be fixed, exp1 does not have this problem
@ghost1372 Experimental 1 doesn't have this problem because WebView2 was still part of the Windows App SDK. It is 1.6 Experimental 2 where it was removed from the Windows App SDK and referenced via a NuGet package reference. It is also understandable why WebView2 was removed from the Windows App SDK package.
And also, to quote my own post:
But I would definitely think that this is an issue with the WebView2 NuGet package. It seems to be attempting to copy the projection and runtime unconditionally.
I totally believe that this should be fixed too. The action of adding the platforms to the class library project served two purposes. The first was to track down the issue. The second is to provide a temporary workaround to this problem. It allows you to evaluate the changes and you are always able to change the class library back to Any CPU when the issue is fixed.
This issue exist in v1.6-preview1, however we can fix it by installing Microsoft.Web.WebView2 nuget package version 1.0.2651.64
anyway this issue should be fixed
issue fixed in v1.6-preview2 so i am closing this issue
Describe the bug
after updating my project to WASDK 1.6-exp2 i get following error in classlibrary:
MSB3030 Could not copy the file "E:\Cache\.nuget\packages\microsoft.web.webview2\1.0.2646-prerelease\build\..\\runtimes\win-anycpu\native_uap\Microsoft.Web.WebView2.Core.dll" because it was not found.
Steps to reproduce the bug
1.Update Current Project to exp2
Expected behavior
No response
Screenshots
No response
NuGet package version
Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2
Packaging type
Packaged (MSIX), Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview, Visual Studio 2022
Additional context
No response