Open MarkStega opened 2 years ago
Hello, thanks for contacting us. Could you please double check if C:\Solutions\OHI\Optimiser\Optimiser.2021.Blazor\Optimiser.2021.Blazor.csproj
exists on disk?
Hi @MarkStega. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hello @TanayParikh , I just created a Blazor WebAssembly project using Visual Studio 2022. After creating the project, I cannot even run it for the first time without changes. The error is the same.
Error Could not find %(ResolvedRuntimePack.PackageDirectory)= Test1 C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-rc.2.21480.5\Sdk\WasmApp.targets
This is pointing to an error in WasmApp.targets
, line 161, where the very first error condition hits on the following xml
<Target Name="_InitializeCommonProperties">
<Error Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == '' and ('%(ResolvedRuntimePack.PackageDirectory)' == '' or !Exists(%(ResolvedRuntimePack.PackageDirectory)))"
Text="Could not find %25(ResolvedRuntimePack.PackageDirectory)=%(ResolvedRuntimePack.PackageDirectory)" />
<Error Condition="'$(IntermediateOutputPath)' == ''" Text="%24(IntermediateOutputPath) property needs to be set" />
<PropertyGroup>
<MicrosoftNetCoreAppRuntimePackDir Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == ''">%(ResolvedRuntimePack.PackageDirectory)</MicrosoftNetCoreAppRuntimePackDir>
<MicrosoftNetCoreAppRuntimePackRidDir Condition="'$(MicrosoftNetCoreAppRuntimePackRidDir)' == ''">$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', 'browser-wasm'))</MicrosoftNetCoreAppRuntimePackRidDir>
<MicrosoftNetCoreAppRuntimePackRidDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir)))</MicrosoftNetCoreAppRuntimePackRidDir>
<MicrosoftNetCoreAppRuntimePackRidNativeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native'))</MicrosoftNetCoreAppRuntimePackRidNativeDir>
<_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include'))</_WasmRuntimePackIncludeDir>
<_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src'))</_WasmRuntimePackSrcDir>
<_WasmIntermediateOutputPath Condition="'$(WasmBuildingForNestedPublish)' == ''">$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'wasm', 'for-build'))</_WasmIntermediateOutputPath>
<_WasmIntermediateOutputPath Condition="'$(WasmBuildingForNestedPublish)' != ''">$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'wasm', 'for-publish'))</_WasmIntermediateOutputPath>
<_DriverGenCPath>$(_WasmIntermediateOutputPath)driver-gen.c</_DriverGenCPath>
<_WasmShouldAOT Condition="'$(WasmBuildingForNestedPublish)' == 'true' and '$(RunAOTCompilation)' == 'true'">true</_WasmShouldAOT>
<_WasmShouldAOT Condition="'$(RunAOTCompilationAfterBuild)' == 'true' and '$(RunAOTCompilation)' == 'true'">true</_WasmShouldAOT>
<_WasmShouldAOT Condition="'$(_WasmShouldAOT)' == ''">false</_WasmShouldAOT>
</PropertyGroup>
<MakeDir Directories="$(_WasmIntermediateOutputPath)" />
</Target>
To answer your question, yes in my environment I can see the csproj
file.
Hope this is useful!
@TanayParikh Yes the csproj is there and the dll gets created as expected when the solution is built.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
@lewing FYI
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | MarkStega |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `untriaged` |
Milestone: | - |
Tagging subscribers to this area: See info in area-owners.md if you want to be subscribed.
Author: | MarkStega |
---|---|
Assignees: | radical |
Labels: | `arch-wasm`, `area-VM-meta-mono` |
Milestone: | - |
Could you try building with 6.0 release, with -bl
added to the publish command line? If it still fails then could you attach the generated msbuild.binlog
?
There was an issue with installing previews that would sometimes end up with only some of the workload packs installed. That shouldn't happen with VS2022/6.0 .
I get the same error with 6.0 RTM
C:\Program Files\dotnet\sdk\6.0.100\MSBuild.dll -bl -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\6.0.100\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\6.0.100\dotnet.dll -maxcpucount -property:PublishDir=C:\Solutions\OHI\publish -property:SelfContained=false -property:_CommandLineDefinedSelfContained=true -property:Configuration=LBH -restore -target:Publish -verbosity:m optimiser.2021.web\optimiser.2021.web.csproj
Determining projects to restore...
Restored C:\Solutions\OHI\Optimiser\optimiser.2021.web\optimiser.2021.web.csproj (in 1.42 sec).
7 of 8 projects are up-to-date for restore.
1 file(s) copied.
1 file(s) copied.
SharedUtilities -> C:\Solutions\OHI\Optimiser\SharedUtilities\bin\LBH\net6.0\SharedUtilities.dll
GeneralComponents -> C:\Solutions\OHI\Optimiser\GeneralComponents\bin\LBH\net6.0\GeneralComponents.dll
SystemFramework -> C:\Solutions\OHI\Optimiser\SystemFramework\bin\LBH\net6.0\SystemFramework.dll
DataTier -> C:\Solutions\OHI\Optimiser\DataTier\bin\LBH\net6.0\DataTier.dll
DocumentProduction -> C:\Solutions\OHI\Optimiser\DocumentProduction\bin\LBH\net6.0\DocumentProduction.dll
Optimiser.2021 -> C:\Solutions\OHI\Optimiser\Optimiser.2021\bin\LBH\net6.0\Optimiser.2021.dll
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0\Sdk\WasmApp.targets(161,5): error : Could not find %(ResolvedRuntimePack.PackageDirectory)= [C:\Solutions\OHI\Optimiser\Optimiser.2021.Blazor\Optimiser.2021.Blazor.csproj]
Can you share the list of files under C:\Program Files\dotnet\packs
? This might be due to a corrupted setup. One way to confirm that would be to test with a simple project:
dotnet new blazorwasm
dotnet build -bl
dotnet build -bl -p:WasmBuildNative=true
Both builds succeeded...
C:\Program Files\dotnet\packs>dir
Volume in drive C is Windows
Volume Serial Number is 463F-F727
Directory of C:\Program Files\dotnet\packs
08/11/2021 11:42 AM <DIR> .
08/11/2021 11:42 AM <DIR> ..
06/17/2021 02:26 PM <DIR> Microsoft.Android.Ref
06/17/2021 02:26 PM <DIR> Microsoft.Android.Sdk.BundleTool
06/17/2021 02:26 PM <DIR> Microsoft.Android.Sdk.Windows
11/08/2021 11:36 AM <DIR> Microsoft.AspNetCore.App.Ref
06/17/2021 02:28 PM <DIR> Microsoft.iOS.Ref
06/17/2021 02:27 PM <DIR> Microsoft.iOS.Sdk
06/17/2021 02:28 PM <DIR> Microsoft.iOS.Windows.Sdk
06/17/2021 02:28 PM <DIR> Microsoft.MacCatalyst.Ref
06/17/2021 02:28 PM <DIR> Microsoft.MacCatalyst.Sdk
06/17/2021 02:29 PM <DIR> Microsoft.macOS.Ref
06/17/2021 02:29 PM <DIR> Microsoft.macOS.Sdk
07/28/2021 09:46 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.21.Node.win-x64
07/28/2021 09:46 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.21.Python.win-x64
07/28/2021 09:48 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.21.Sdk.win-x64
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Node.win-x64
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Python.win-x64
11/08/2021 11:58 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Sdk.win-x64
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.MonoAOTCompiler.Task
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.MonoTargets.Sdk
07/28/2021 09:48 AM <DIR> Microsoft.NET.Runtime.RuntimeConfigParser.Task
11/08/2021 11:58 AM <DIR> Microsoft.NET.Runtime.WebAssembly.Sdk
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-arm
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-arm64
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-x64
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-x86
11/08/2021 11:36 AM <DIR> Microsoft.NETCore.App.Ref
11/08/2021 11:58 AM <DIR> Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm
11/08/2021 11:58 AM <DIR> Microsoft.NETCore.App.Runtime.Mono.browser-wasm
06/17/2021 02:29 PM <DIR> Microsoft.tvOS.Ref
06/17/2021 02:29 PM <DIR> Microsoft.tvOS.Sdk
11/08/2021 11:49 AM <DIR> Microsoft.WindowsDesktop.App.Ref
07/09/2020 01:22 PM <DIR> NETStandard.Library.Ref
0 File(s) 0 bytes
34 Dir(s) 412,116,533,248 bytes free
C:\Program Files\dotnet\packs>
I removed all of the packs that were not dated 11/08 and the error persists...
C:\Program Files\dotnet\packs>dir
Volume in drive C is Windows
Volume Serial Number is 463F-F727
Directory of C:\Program Files\dotnet\packs
11/12/2021 09:03 AM <DIR> .
11/12/2021 09:03 AM <DIR> ..
11/08/2021 11:36 AM <DIR> Microsoft.AspNetCore.App.Ref
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Node.win-x64
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Python.win-x64
11/08/2021 11:58 AM <DIR> Microsoft.NET.Runtime.Emscripten.2.0.23.Sdk.win-x64
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.MonoAOTCompiler.Task
11/08/2021 11:57 AM <DIR> Microsoft.NET.Runtime.MonoTargets.Sdk
11/08/2021 11:58 AM <DIR> Microsoft.NET.Runtime.WebAssembly.Sdk
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-arm
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-arm64
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-x64
11/08/2021 07:11 PM <DIR> Microsoft.NETCore.App.Host.win-x86
11/08/2021 11:36 AM <DIR> Microsoft.NETCore.App.Ref
11/08/2021 11:58 AM <DIR> Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm
11/08/2021 11:58 AM <DIR> Microsoft.NETCore.App.Runtime.Mono.browser-wasm
11/08/2021 11:49 AM <DIR> Microsoft.WindowsDesktop.App.Ref
11/12/2021 09:03 AM <DIR> OldPacks
0 File(s) 0 bytes
18 Dir(s) 412,118,716,416 bytes free
C:\Program Files\dotnet\packs>
Describe the bug
When I use VS2022 to publish my hosted Blazor WASM application (consisting of the .Net server, several 'standard' dll's, a Blazor webassembly dll, and a Razor class library) the publish succeeds. After moving the content of the publish into my IIS application I can launch the application and it works.
When I try to use the CLI to publish it fails with:
To Reproduce
Simply run the publish via CLI
I haev not been able to create a small reproduction.
Exceptions (if any)
Further technical details
dotnet --info
:Runtime Environment: OS Name: Windows OS Version: 10.0.19043 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\
Host (useful for support): Version: 6.0.0-rc.2.21480.5 Commit: 6b11d64e7e
.NET SDKs installed: 3.1.414 [C:\Program Files\dotnet\sdk] 6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0-rc.2.21501.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
C:\Solutions\OHI\Optimiser>```