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

Project with multiple RuntimeIdentifiers is missing exe in Self Contained deployment #10474

Closed
vitek-karas opened this issue Dec 14, 2018 · 19 comments
Assignees
Milestone

Comments

@vitek-karas
Copy link
Member

@vitek-karas vitek-karas commented Dec 14, 2018

From @Suchiman on December 13, 2018 17:20

With a csproj looking like

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <RuntimeIdentifiers>win10-x64;win7-x86</RuntimeIdentifiers>
    <LangVersion>latest</LangVersion>
    <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
  </PropertyGroup>

and a publish definition looking like

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>Package</WebPublishMethod>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <ProjectGuid>33bc8379-5f2a-45eb-ae65-aa8cd2c62a72</ProjectGuid>
    <DesktopBuildPackageLocation>$(BUILD_ARTIFACTSTAGINGDIRECTORY)\Project.zip</DesktopBuildPackageLocation>
    <PackageAsSingleFile>true</PackageAsSingleFile>
    <DeployIisAppPath />
    <PublishDatabaseSettings>
      <Objects xmlns="" />
    </PublishDatabaseSettings>
    <SelfContained>true</SelfContained>
    <UseAppHost>true</UseAppHost>
    <_IsPortable>false</_IsPortable>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
  </PropertyGroup>
</Project>

Performing a publish will generate an self contained looking output except that the Project.exe is missing and there's only a Project.dll

Changing

    <RuntimeIdentifiers>win10-x64;win7-x86</RuntimeIdentifiers>

to

    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>

fixes this but has dotnet/core-setup#4865 as a side effect

Copied from original issue: dotnet/core#2147

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

Experiencing the same problem here and setting only one identifier does NOT correct the issue for me.

<RuntimeIdentifier>win-x64</RuntimeIdentifier>

Any other suggestions?

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

@StillLearnin this is something we're fixing properly for 3.0.

Does setting _DotNetAppHostExecutableName to apphost.exe in your publish profile fix the issue?

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

I was using the CLI to publish with this command
dotnet publish -c Release --self-contained --runtime "win-x64"
Can it be done with the CLI?

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

Setting the RID from the command line using the --runtime switch will also solve the issue.

Did you try the above workaround I mentioned via setting that property in the publish profile?

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

Sorry, I don't know how to change the publish profile.
I'm coding in VS2017 CE and I've always done my publishing via the command line using the command I listed above. It used to work but I think it broke when I started targeting .net core 2.2.

Can you give me any pointers on setting that property in the publish profile? I googled it but couldn't find anything on that property.

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

@StillLearnin I see. Let's take a step back then.

Where are you setting the RuntimeIdentifier currently and having the issue? If you're publishing via Visual Studio, what properties are you setting for the publish?

If you're only publishing from the command line, dotnet publish -c Release --self-contained --runtime "win-x64" should guarantee a self-contained publish and there should be an executable in bin\Release\win-x64\publish. Is that not the case?

Would you mind pasting the output of dotnet --info? Thanks.

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

Yes, I'm only publishing from the command line which is where the RuntimeIdentifier is set.

Output of dotnet publish -c Release --self-contained --runtime "win-x64"

Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\ttp.licensing\TTP.Licensing\TTP.Licensing.csproj...
  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\SolidMapper\SolidMapper\SolidMapper\SolidMapper.csproj...
  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\ttp.models\ttp.models\TTP.Models.csproj...
  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Services\Candle.Services.csproj...
  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Models\Candle.Models.csproj...
  Restoring packages for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj...
  Restore completed in 130.47 ms for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj.
  Restore completed in 285.8 ms for C:\TeachersTradingPostCode\candle.asp.net-core\SolidMapper\SolidMapper\SolidMapper\SolidMapper.csproj.
  Restore completed in 1.68 sec for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Services\Candle.Services.csproj.
  Restore completed in 1.66 sec for C:\TeachersTradingPostCode\candle.asp.net-core\ttp.licensing\TTP.Licensing\TTP.Licensing.csproj.
  Restore completed in 1.68 sec for C:\TeachersTradingPostCode\candle.asp.net-core\ttp.models\ttp.models\TTP.Models.csproj.
  Restore completed in 1.68 sec for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Models\Candle.Models.csproj.
  Restore completed in 1.68 sec for C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj.
C:\Program Files\dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(153,5): warning NETSDK1071: A PackageReference to 'Microsoft.AspNetCore.App' specified a Version of `2.2.0`. Specifying the version of this package is not recommended. For more information, see https://aka.ms/sdkimplicitrefs [C:\TeachersTradingPostCode\candle.asp.net-core\ttp.models\ttp.models\TTP.Models.csproj]
  SolidMapper -> C:\TeachersTradingPostCode\candle.asp.net-core\SolidMapper\SolidMapper\SolidMapper\bin\Release\netcoreapp2.2\SolidMapper.dll
  TTP.Models -> C:\TeachersTradingPostCode\candle.asp.net-core\ttp.models\ttp.models\bin\Release\netcoreapp2.2\TTP.Models.dll
  Candle.Models -> C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Models\bin\Release\netcoreapp2.2\Candle.Models.dll
  TTP.Licensing -> C:\TeachersTradingPostCode\candle.asp.net-core\ttp.licensing\TTP.Licensing\bin\Release\netcoreapp2.2\TTP.Licensing.dll
  Candle.Services -> C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.Services\bin\Release\netcoreapp2.2\Candle.Services.dll
Pages\Setup\Contacts\Parents\SharedEditModel.cs(18,42): warning CS0169: The field 'SharedEditModel.familiesService' is never used [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Account\Manage\SetPassword.cshtml(9,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Account\Manage\Index.cshtml(8,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Account\Manage\ChangePassword.cshtml(8,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Setup\Users\Profile.cshtml(8,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Account\Manage\ExternalLogins.cshtml(7,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Setup\Users\AuthLevels.cshtml(7,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
Pages\Setup\Users\Password.cshtml(7,7): warning MVC1000: Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync. [C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\Candle.WebApp.csproj]
  Candle.WebApp -> C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\bin\Release\netcoreapp2.2\win-x64\Candle.WebApp.dll
  Candle.WebApp -> C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\bin\Release\netcoreapp2.2\win-x64\Candle.WebApp.Views.dll
  Candle.WebApp -> C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\bin\Release\netcoreapp2.2\win-x64\publish\

Note the extra folder in the path:

The output is in bin\Release\netcoreapp2.2\win-x64\publish and does NOT contain an exe.

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.101
 Commit:    236713b0b7

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.101\

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  1.0.4 [C:\Program Files\dotnet\sdk]
  1.1.0-preview1-005077 [C:\Program Files\dotnet\sdk]
  1.1.0 [C:\Program Files\dotnet\sdk]
  2.0.0-preview2-006497 [C:\Program Files\dotnet\sdk]
  2.0.0 [C:\Program Files\dotnet\sdk]
  2.1.2 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.100-preview-007363 [C:\Program Files\dotnet\sdk]
  2.1.100 [C:\Program Files\dotnet\sdk]
  2.1.101 [C:\Program Files\dotnet\sdk]
  2.1.102 [C:\Program Files\dotnet\sdk]
  2.1.103 [C:\Program Files\dotnet\sdk]
  2.1.104 [C:\Program Files\dotnet\sdk]
  2.1.200-preview-007474 [C:\Program Files\dotnet\sdk]
  2.1.200 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.300-preview1-008174 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]
  2.1.301 [C:\Program Files\dotnet\sdk]
  2.1.400-preview-009063 [C:\Program Files\dotnet\sdk]
  2.1.400-preview-009171 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.402 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500 [C:\Program Files\dotnet\sdk]
  2.1.502 [C:\Program Files\dotnet\sdk]
  2.1.503 [C:\Program Files\dotnet\sdk]
  2.1.504 [C:\Program Files\dotnet\sdk]
  2.1.505 [C:\Program Files\dotnet\sdk]
  2.1.600 [C:\Program Files\dotnet\sdk]
  2.2.101 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.0-preview2-25407-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-preview1-26216-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

Does the netcoreapp2.2\win-x64\publish directory otherwise contain a self-contained application? That is to say, do you see ".NET Core runtime" files such as hostfxr.dll or hostpolicy.dll?

Is there any files present in Properties\PublishProfile for your project?

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

Neither hostfxr.dll nor hostpolicy.dll exist in that folder.
Properties\PublishProfiles folder is empty.

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

That's very surprising then. If possible, would you mind collecting a binlog for your publish command (passing the /bl switch) and emailing the resulting MSBuild.binlog file to me at pehuene@microsoft.com?

Before doing so, however, please see this information regarding the data collection for the binlogs in MSBuild. If you're unable to send one due to concerns regarding data disclosure, I will continue to help diagnose the issue via this issue instead.

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 29, 2019

I'm more than happy to do that! Just sent the email seconds ago.

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 29, 2019

Thanks, I've received the log. I will investigate when I get a moment to do so and report back to you here.

@dasMulli

This comment has been minimized.

Copy link

@dasMulli dasMulli commented Apr 29, 2019

Quick sanity check, does your csproj contain?:

<OutputType>Exe</OutputType>
@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 30, 2019

It doesn't, but this is a web project and the web sdk is setting the output type to executable.

All the required properties are present for the apphost to be created. However, for some reason the ResolvePackageAssets task is not outputting anything from Microsoft.NETCore.App or its dependencies (this includes the native apphost), so it implies something is wrong with the restore graph for Candle.WebApp.

I'm unable to reproduce the problem with a new web app (but with otherwise identical project file, minus the project references).

@StillLearnin would you mind sending me C:\TeachersTradingPostCode\candle.asp.net-core\Candle\Candle.WebApp\obj\project.assets.json after running dotnet publish -c Release --self-contained --runtime "win-x64" to the same email address? It should help me determine what's wrong with the restore graph.

After sending me the file, try deleting the obj directory. Perhaps something is wrong with the cache file and it's not properly representing the restore graph.

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 30, 2019

@peterhuene I sent you the file. Deleting obj directory and publishing again didn't help.
Don't know if this makes any difference but the project was started about a year and a half ago and targeted .net core 2.0. Since then it has been upgraded to 2.1 and then to 2.2

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented Apr 30, 2019

@peterhuene it's WORKING!!!
I installed the latest released .Net Core SDK, upgraded EntityFrameworkCore and EntityFrameworkCore.Tools from 2.2.3 to 2.2.4 so my projects would build, and now it works.

I greatly appreciate the time you've spent with me on troubleshooting this and wish you a blessed day!

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Apr 30, 2019

@StillLearnin I looked at your project.assets.json. Oddly, all of the runtime.win-x64.Microsoft.NETCore.* packages have no runtime/ files in them.

If you still have %USERPROFILE%\.nuget\packages\runtime.win-x64.microsoft.netcore.dotnetapphost\2.2.0, there should be a non-empty runtimes\win-x64\native directory in it. Yours appears to have been empty or nonexistent and I can't explain why. Perhaps a previous restore operation for these packages failed and left these packages in a corrupted state? Or maybe an overzealous antivirus program quarantined these .dlls/.exes?

Upgrading your .NET Core SDK version worked likely because the .NET Core runtime packages are now a different version, which forced a restore of different packages and the runtime/ files are now present. Deleting your NuGet package cache (%USERPROFILE%\.nuget) would likely also have solved the problem.

I'm glad you're unblocked :)

@StillLearnin

This comment has been minimized.

Copy link

@StillLearnin StillLearnin commented May 6, 2019

@peterhuene yes, .nuget\packages\runtime.win-x64.microsoft.netcore.dotnetapphost\2.2.0\runtimes\win-x64\native is empty so I think your ideas are correct except for the overzealous AV. There is no indication in my AV software that the files were blocked or quarantined, so my vote goes on the side of a failed restore leaving things in a corrupted state. It might even have been an issue with the corporate proxy blocking the download of the files.

@peterhuene

This comment has been minimized.

Copy link

@peterhuene peterhuene commented Aug 6, 2019

The original issue should now be fixed in the latest 3.0 previews.

The .NET Core SDK now imports publish profiles (you can even pass /p:PublishProfile=Foo to dotnet publish) at the appropriate time to allow the specified properties to be properly respected. Thus, properties like the RuntimeIdentifier and UseAppHost in the publish profile will work as expected.

I'm going to close this issue as fixed. Feel free to reactivate if the latest .NET Core 3.0 preview does not address the issue.

@peterhuene peterhuene closed this Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.