2

Visual Studio 2017에 .Net Core ASP.Net 응용 프로그램이 있습니다. 응용 프로그램 자체 포함 배포를 시도하고 있습니다. 나는 CLI에서 다음 명령을 실행하면 내가 원하는 정확히 어떻게 작동하고 난 비주얼 스튜디오 2017에서 게시하는 경우 그것은 .EXE를 생산하고 생산하지 않습니다 그러나, .EXEVisual Studio 2017 ASP.Net 자체 닷넷 코어 응용 프로그램 게시

dotnet publish -c release -r win7-x64 

을 생산

. 대신 DLL을.

Visual Studio 2017에서 dotnet publish 명령의 -r win7-x64를 어떻게 복제 할 수 있습니까? 여기

<?xml version="1.0" encoding="utf-8"?> 
<!-- 
This file is used by the publish/package process of your Web project. You can customize the behavior of this process 
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. 
--> 
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <PropertyGroup> 
    <WebPublishMethod>FileSystem</WebPublishMethod> 
    <PublishProvider>FileSystem</PublishProvider> 
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> 
    <LastUsedPlatform>Any CPU</LastUsedPlatform> 
    <SiteUrlToLaunchAfterPublish /> 
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> 
    <ExcludeApp_Data>False</ExcludeApp_Data> 
    <PublishFramework>netcoreapp1.1</PublishFramework> 
    <ProjectGuid>74bc47dd-6787-420d-804f-3f3d689d5ae5</ProjectGuid> 
    <publishUrl>C:\Deploy\JLM.MS.LeadGen.Dealer</publishUrl> 
    <DeleteExistingFiles>True</DeleteExistingFiles> 
    <RuntimeIdentifiers>win7-x64</RuntimeIdentifiers> 
    </PropertyGroup> 
</Project> 
+0

csproj도 공유 할 수 있습니까? – natemcmaster

답변

3

이 경험은 비주얼 스튜디오의 게시 창에 추가 된 당신의 .csproj에

<OutputType>Exe</OutputType> 

를 추가 할 필요가 내 .pubxml의 내용입니다 2017 버전 15.3 (다운로드 가능 here)

프로젝트를 마우스 오른쪽 버튼으로 클릭하고 "Publish (게시)"- "Summary (요약)"아래의 "Settings ..."링크를 클릭 한 다음 Publish 창의 Settings 탭으로 이동하면 Target Runtime 드롭 다운이 표시됩니다. 플랫폼에서 실행할 수 있습니다. Here's 내가 말하는 것에 대한 스크린 샷.

프로젝트 파일에서 <RuntimeIdentifiers> 또는 <RuntimeIdentifier>에 선택할 런타임을 포함해야합니다. 드롭 다운에서 값을 채우기 위해 이러한 속성을 찾습니다.

0

당신은

+0

이미 내 .csproj에 있습니다. .pubxml에 추가해야합니까? – jkruer01

+0

나는 그렇게 생각하지 않는다. 출력 유형이나 런타임 식별자를 추가 한 후에'dotnet restore'를 실행 했습니까? –

+0

예. 닷넷 복원을 했어. – jkruer01