dotnet publish -r only works for win10-x64
See original GitHub issueFor web and mvc projects, dotnet publish -r only works for win10-x64.
For osx-x64 or linux-arm for example, you get a hostpolicy.dll not found error.
*Does this mean we can’t build and publish for OTHER machines (not the local machine)?
C:\Users\scott\Desktop\rasppiwebempty>dotnet publish -r osx-x64
Microsoft (R) Build Engine version 15.3.406.54721 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
rasppiwebempty -> C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\osx-x64\rasppiwebempty.dll
Could not find required library hostpolicy.dll in 3 probing paths:
C:\Users\scott\.nuget\packages
C:\Users\scott\.dotnet\NuGetFallbackFolder
C:\Program Files\dotnet\sdk\NuGetFallbackFolder
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\osx-x64\'.
C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0-rtm-26343\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets(60,5): error MSB3073: The command ""C:\Program Files\dotnet\dotnet.exe" exec --runtimeconfig "C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\osx-x64\rasppiwebempty.runtimeconfig.json" --depsfile "C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\osx-x64\rasppiwebempty.deps.json" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0-rtm-26343\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj\Debug\netcoreapp2.0\osx-x64\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" exited with code -2147450749. [C:\Users\scott\Desktop\rasppiwebempty\rasppiwebempty.csproj]
C:\Users\scott\Desktop\rasppiwebempty>dotnet publish -r win10-x64
Microsoft (R) Build Engine version 15.3.406.54721 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
rasppiwebempty -> C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\win10-x64\rasppiwebempty.dll
rasppiwebempty -> C:\Users\scott\Desktop\rasppiwebempty\bin\Debug\netcoreapp2.0\win10-x64\publish\
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
dotnet publish -r only works for win10-x64 · Issue #2105
For web and mvc projects, dotnet publish -r only works for win10-x64. For osx-x64 or linux-arm for example, you get a hostpolicy.dll not ......
Read more >Publish .NET apps with the .NET CLI
This article demonstrates how you can publish your .NET application from the command line. .NET provides three ways to publish your ...
Read more >Can I shrink a dotnet publish package
I am using the CLI and as I am only interested in Win 10 deployments, tried dotnet publish -c release -r win10-x64. It...
Read more >Too many dlls when publishing dotnet
dotnet publish -c Release -r win10-x64 --self-contained. It worked. However, the folder contained a huge amount of dlls even though I typed ...
Read more >Publishing DotNET Core Apps
1\win10-x64\publish folder in Windows Explorer, we see whole lot of files, together, all these files are enough to run the app on another ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@moozzyk
Interesting… I tried
$env:MvcRazorCompileOnPublish="False"
and could not make it work but/p:MvcRazorCompileOnPublish=false
did the trick.