2 ***********************************************************************************************
\r
3 Microsoft.NET.Sdk.targets
\r
5 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
\r
6 created a backup copy. Incorrect changes to this file will make it
\r
7 impossible to load or build your projects from the command-line or the IDE.
\r
9 Copyright (c) .NET Foundation. All rights reserved.
\r
10 ***********************************************************************************************
\r
12 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
\r
15 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
\r
18 <!-- Workaround: https://github.com/Microsoft/msbuild/issues/1293 -->
\r
19 <PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core' Or '$(TargetFrameworkIdentifier)' != '.NETFramework'">
\r
20 <GenerateResourceMSBuildArchitecture Condition=" '$(GenerateResourceMSBuildArchitecture)' == '' ">CurrentArchitecture</GenerateResourceMSBuildArchitecture>
\r
21 <GenerateResourceMSBuildRuntime Condition=" '$(GenerateResourceMSBuildRuntime)' == '' ">CurrentRuntime</GenerateResourceMSBuildRuntime>
\r
24 <Import Project="Microsoft.NET.Sdk.Common.targets" />
\r
27 <Import Project="$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets')" />
\r
30 <Import Project="Microsoft.NET.Sdk.DefaultItems.targets" />
\r
32 <UsingTask TaskName="GenerateDepsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
\r
33 <UsingTask TaskName="GenerateRuntimeConfigurationFiles" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
\r
34 <UsingTask TaskName="GetAssemblyVersion" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
\r
35 <UsingTask TaskName="GenerateSatelliteAssemblies" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
\r
38 <DisableStandardFrameworkResolution Condition="'$(DisableStandardFrameworkResolution)' == ''">$(_IsNETCoreOrNETStandard)</DisableStandardFrameworkResolution>
\r
42 <GenerateRuntimeConfigurationFiles Condition=" '$(GenerateRuntimeConfigurationFiles)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true' ">true</GenerateRuntimeConfigurationFiles>
\r
43 <UserRuntimeConfig Condition=" '$(UserRuntimeConfig)' == '' ">$(MSBuildProjectDirectory)/runtimeconfig.template.json</UserRuntimeConfig>
\r
44 <GenerateSatelliteAssembliesForCore Condition=" '$(GenerateSatelliteAssembliesForCore)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">true</GenerateSatelliteAssembliesForCore>
\r
45 <ComputeNETCoreBuildOutputFiles Condition=" '$(ComputeNETCoreBuildOutputFiles)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true</ComputeNETCoreBuildOutputFiles>
\r
49 <ProjectDepsFileName Condition="'$(ProjectDepsFileName)' == ''">$(AssemblyName).deps.json</ProjectDepsFileName>
\r
50 <ProjectDepsFilePath Condition="'$(ProjectDepsFilePath)' == ''">$(TargetDir)$(ProjectDepsFileName)</ProjectDepsFilePath>
\r
51 <ProjectRuntimeConfigFileName Condition="'$(ProjectRuntimeConfigFileName)' == ''">$(AssemblyName).runtimeconfig.json</ProjectRuntimeConfigFileName>
\r
52 <ProjectRuntimeConfigFilePath Condition="'$(ProjectRuntimeConfigFilePath)' == ''">$(TargetDir)$(ProjectRuntimeConfigFileName)</ProjectRuntimeConfigFilePath>
\r
53 <ProjectRuntimeConfigDevFilePath Condition="'$(ProjectRuntimeConfigDevFilePath)' == ''">$(TargetDir)$(AssemblyName).runtimeconfig.dev.json</ProjectRuntimeConfigDevFilePath>
\r
54 <IncludeMainProjectInDepsFile Condition=" '$(IncludeMainProjectInDepsFile)' == '' ">true</IncludeMainProjectInDepsFile>
\r
58 <_NativeLibraryPrefix Condition="'$(_NativeLibraryPrefix)' == '' and !$(RuntimeIdentifier.StartsWith('win'))">lib</_NativeLibraryPrefix>
\r
60 <_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == '' and $(RuntimeIdentifier.StartsWith('win'))">.dll</_NativeLibraryExtension>
\r
61 <_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == '' and $(RuntimeIdentifier.StartsWith('osx'))">.dylib</_NativeLibraryExtension>
\r
62 <_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == ''">.so</_NativeLibraryExtension>
\r
64 <_NativeExecutableExtension Condition="'$(_NativeExecutableExtension)' == '' and $(RuntimeIdentifier.StartsWith('win'))">.exe</_NativeExecutableExtension>
\r
66 <_DotNetHostExecutableName>dotnet$(_NativeExecutableExtension)</_DotNetHostExecutableName>
\r
67 <_DotNetAppHostExecutableName>apphost$(_NativeExecutableExtension)</_DotNetAppHostExecutableName>
\r
69 <_DotNetHostPolicyLibraryName>$(_NativeLibraryPrefix)hostpolicy$(_NativeLibraryExtension)</_DotNetHostPolicyLibraryName>
\r
70 <_DotNetHostFxrLibraryName>$(_NativeLibraryPrefix)hostfxr$(_NativeLibraryExtension)</_DotNetHostFxrLibraryName>
\r
74 <_DefaultUserProfileRuntimeStorePath>$(HOME)</_DefaultUserProfileRuntimeStorePath>
\r
75 <_DefaultUserProfileRuntimeStorePath Condition="'$(OS)' == 'Windows_NT'">$(USERPROFILE)</_DefaultUserProfileRuntimeStorePath>
\r
76 <_DefaultUserProfileRuntimeStorePath>$([System.IO.Path]::Combine($(_DefaultUserProfileRuntimeStorePath), '.dotnet', 'store'))</_DefaultUserProfileRuntimeStorePath>
\r
77 <UserProfileRuntimeStorePath Condition="'$(UserProfileRuntimeStorePath)' == ''">$(_DefaultUserProfileRuntimeStorePath)</UserProfileRuntimeStorePath>
\r
81 <CoreBuildDependsOn>
\r
82 $(CoreBuildDependsOn);
\r
83 GenerateBuildDependencyFile;
\r
84 GenerateBuildRuntimeConfigurationFiles
\r
85 </CoreBuildDependsOn>
\r
89 ============================================================
\r
90 GenerateBuildDependencyFile
\r
92 Generates the $(project).deps.json file during Build
\r
93 ============================================================
\r
96 <Target Name="GenerateBuildDependencyFile"
\r
97 DependsOnTargets="_DefaultMicrosoftNETPlatformLibrary;
\r
98 _HandlePackageFileConflicts;
\r
99 _ComputeReferenceAssemblies"
\r
100 BeforeTargets="CopyFilesToOutputDirectory"
\r
101 Condition=" '$(GenerateDependencyFile)' == 'true'"
\r
102 Inputs="$(ProjectAssetsFile)"
\r
103 Outputs="$(ProjectDepsFilePath)">
\r
106 Explicitly not passing any ExcludeFromPublishPackageReferences information during 'Build', since these dependencies
\r
107 should be included during 'Build'. They are only excluded on 'Publish'.
\r
109 <GenerateDepsFile ProjectPath="$(MSBuildProjectFullPath)"
\r
110 AssetsFilePath="$(ProjectAssetsFile)"
\r
111 DepsFilePath="$(ProjectDepsFilePath)"
\r
112 TargetFramework="$(TargetFrameworkMoniker)"
\r
113 AssemblyName="$(AssemblyName)"
\r
114 AssemblyExtension="$(TargetExt)"
\r
115 AssemblyVersion="$(Version)"
\r
116 AssemblySatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath)"
\r
117 ReferencePaths="@(ReferencePath)"
\r
118 ReferenceSatellitePaths="@(ReferenceSatellitePaths)"
\r
119 ReferenceAssemblies="@(_ReferenceAssemblies)"
\r
120 IncludeMainProject="$(IncludeMainProjectInDepsFile)"
\r
121 RuntimeIdentifier="$(RuntimeIdentifier)"
\r
122 PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
\r
123 FilesToSkip="@(_ConflictPackageFiles)"
\r
124 CompilerOptions="@(DependencyFileCompilerOptions)"
\r
125 IsSelfContained="$(SelfContained)">
\r
126 </GenerateDepsFile>
\r
129 <!-- Do this in an ItemGroup instead of as an output parameter of the GenerateDepsFile task so that it still gets added to the item set
\r
130 during incremental builds when the task is skipped -->
\r
131 <FileWrites Include="$(ProjectDepsFilePath)" Condition="Exists('$(ProjectDepsFilePath)')"/>
\r
136 ============================================================
\r
137 GenerateBuildRuntimeConfigurationFiles
\r
139 Generates the $(project).runtimeconfig.json and $(project).runtimeconfig.dev.json files during Build
\r
140 ============================================================
\r
143 <Target Name="GenerateBuildRuntimeConfigurationFiles"
\r
144 DependsOnTargets="_DefaultMicrosoftNETPlatformLibrary"
\r
145 BeforeTargets="CopyFilesToOutputDirectory"
\r
146 Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'"
\r
147 Inputs="$(ProjectAssetsFile);$(UserRuntimeConfig)"
\r
148 Outputs="$(ProjectRuntimeConfigFilePath);$(ProjectRuntimeConfigDevFilePath)">
\r
150 <GenerateRuntimeConfigurationFiles AssetsFilePath="$(ProjectAssetsFile)"
\r
151 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
152 TargetFramework="$(TargetFramework)"
\r
153 RuntimeConfigPath="$(ProjectRuntimeConfigFilePath)"
\r
154 RuntimeConfigDevPath="$(ProjectRuntimeConfigDevFilePath)"
\r
155 RuntimeIdentifier="$(RuntimeIdentifier)"
\r
156 PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
\r
157 UserRuntimeConfig="$(UserRuntimeConfig)"
\r
158 HostConfigurationOptions="@(RuntimeHostConfigurationOption)"
\r
159 AdditionalProbingPaths="@(AdditionalProbingPath)"
\r
160 IsSelfContained="$(SelfContained)">
\r
162 </GenerateRuntimeConfigurationFiles>
\r
165 <!-- Do this in an ItemGroup instead of as an output parameter of the GenerateDepsFile task so that it still gets added to the item set
\r
166 during incremental builds when the task is skipped -->
\r
167 <FileWrites Include="$(ProjectRuntimeConfigFilePath)" Condition="Exists('$(ProjectRuntimeConfigFilePath)')"/>
\r
168 <FileWrites Include="$(ProjectRuntimeConfigDevFilePath)" Condition="Exists('$(ProjectRuntimeConfigDevFilePath)')"/>
\r
173 <!-- Add runtimeconfig.json file to BuiltProjectOutputGroupOutput, so that it will get included in the NuGet package by the Pack target -->
\r
174 <Target Name="AddRuntimeConfigFileToBuiltProjectOutputGroupOutput"
\r
175 Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'"
\r
176 BeforeTargets="BuiltProjectOutputGroup">
\r
178 <BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)" FinalOutputPath="$(ProjectRuntimeConfigFilePath)" />
\r
183 ============================================================
\r
184 DefaultRuntimeHostConfigurationOptions
\r
186 Defaults @(RuntimeHostConfigurationOption) items based on MSBuild properties.
\r
187 ============================================================
\r
191 <RuntimeHostConfigurationOption Include="System.GC.Concurrent"
\r
192 Condition="'$(ConcurrentGarbageCollection)' != ''"
\r
193 Value="$(ConcurrentGarbageCollection)" />
\r
195 <RuntimeHostConfigurationOption Include="System.GC.Server"
\r
196 Condition="'$(ServerGarbageCollection)' != ''"
\r
197 Value="$(ServerGarbageCollection)" />
\r
199 <RuntimeHostConfigurationOption Include="System.GC.RetainVM"
\r
200 Condition="'$(RetainVMGarbageCollection)' != ''"
\r
201 Value="$(RetainVMGarbageCollection)" />
\r
203 <RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.MinThreads"
\r
204 Condition="'$(ThreadPoolMinThreads)' != ''"
\r
205 Value="$(ThreadPoolMinThreads)" />
\r
207 <RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.MaxThreads"
\r
208 Condition="'$(ThreadPoolMaxThreads)' != ''"
\r
209 Value="$(ThreadPoolMaxThreads)" />
\r
213 ============================================================
\r
214 DefaultAdditionalProbingPaths
\r
216 Adds the default @(AdditionalProbingPath) items.
\r
217 ============================================================
\r
220 <ItemGroup Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true' and '$(SkipDefaultAdditionalProbingPaths)' != 'true'">
\r
221 <!-- Note: can't use Path.Combine here since `|` is an illegal path character -->
\r
222 <AdditionalProbingPath Include="$(UserProfileRuntimeStorePath)$([System.IO.Path]::DirectorySeparatorChar)|arch|$([System.IO.Path]::DirectorySeparatorChar)|tfm|" />
\r
226 ============================================================
\r
227 _ComputeNETCoreBuildOutputFiles
\r
229 Computes any files that need to be copied to the build output folder for .NET Core.
\r
230 ============================================================
\r
232 <UsingTask TaskName="EmbedAppNameInHost" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
\r
233 <Target Name="_ComputeNETCoreBuildOutputFiles"
\r
234 DependsOnTargets="_ComputeActiveTFMFileDependencies"
\r
235 AfterTargets="ResolveReferences"
\r
236 BeforeTargets="AssignTargetPaths"
\r
237 Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true'">
\r
240 During "build" and "run" of .NET Core projects, the assemblies coming from NuGet packages
\r
241 are loaded from the NuGet cache. But, in order for a self-contained app to be runnable,
\r
242 it requires a host in the output directory to load the app.
\r
243 During "publish", all required assets are copied to the publish directory.
\r
245 <ItemGroup Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' != '' and '$(_IsExecutable)' == 'true'">
\r
246 <_NETCoreNativeFileItems Include="@(_ActiveTFMFileDependencies->WithMetadataValue('FileGroup', 'NativeLibrary'))" />
\r
247 <__NETCoreNativeItems Include="@(FileDefinitions)" Exclude="@(_NETCoreNativeFileItems)" />
\r
248 <_NETCoreNativeItems Include="@(FileDefinitions)" Exclude="@(__NETCoreNativeItems)" />
\r
250 <NativeNETCoreCopyLocalItems Include="%(_NETCoreNativeItems.ResolvedPath)"
\r
251 Condition="'%(_NETCoreNativeItems.FileName)%(_NETCoreNativeItems.Extension)' == '$(_DotNetHostPolicyLibraryName)' or
\r
252 '%(_NETCoreNativeItems.FileName)%(_NETCoreNativeItems.Extension)' == '$(_DotNetHostFxrLibraryName)'" />
\r
254 <NativeRestoredAppHostNETCore Include="%(_NETCoreNativeItems.ResolvedPath)"
\r
255 Condition="'%(_NETCoreNativeItems.FileName)%(_NETCoreNativeItems.Extension)' == '$(_DotNetAppHostExecutableName)'"/>
\r
258 <PropertyGroup Condition="'@(NativeRestoredAppHostNETCore)' != '' ">
\r
259 <AppHostDestinationDirectoryPath>$(BaseIntermediateOutputPath)\$(TargetFramework)\$(RuntimeIdentifier)\host</AppHostDestinationDirectoryPath>
\r
262 <NETSdkError Condition="'@(NativeRestoredAppHostNETCore->Count())' > 1"
\r
263 ResourceName="MultipleFilesResolved"
\r
264 FormatArguments="$(_DotNetAppHostExecutableName)" />
\r
266 <EmbedAppNameInHost AppHostSourcePath="@(NativeRestoredAppHostNETCore)"
\r
267 AppHostDestinationDirectoryPath="$(AppHostDestinationDirectoryPath)"
\r
268 AppBinaryName="$(AssemblyName)$(TargetExt)"
\r
269 Condition="'@(NativeRestoredAppHostNETCore)' != '' ">
\r
271 <Output TaskParameter="ModifiedAppHostPath" ItemName="NativeAppHostNETCore" />
\r
272 </EmbedAppNameInHost>
\r
274 <ItemGroup Condition="'@(NativeAppHostNETCore)' == '' ">
\r
275 <NativeAppHostNETCore Include="%(_NETCoreNativeItems.ResolvedPath)"
\r
276 Condition="'%(_NETCoreNativeItems.FileName)%(_NETCoreNativeItems.Extension)' == '$(_DotNetHostExecutableName)'" />
\r
279 <NETSdkError Condition="'@(NativeAppHostNETCore->Count())' > 1"
\r
280 ResourceName="MultipleFilesResolved"
\r
281 FormatArguments="@(NativeAppHostNETCore)" />
\r
283 <ItemGroup Condition="'@(NativeAppHostNETCore)' != '' ">
\r
284 <NativeNETCoreCopyLocalItems Include="@(NativeAppHostNETCore)">
\r
285 <!-- Rename the host executable to the app's name -->
\r
286 <Link>$(AssemblyName)%(NativeAppHostNETCore.Extension)</Link>
\r
287 </NativeNETCoreCopyLocalItems>
\r
290 <ItemGroup Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' != '' and '$(_IsExecutable)' == 'true'">
\r
291 <AllNETCoreCopyLocalItems Include="@(NativeNETCoreCopyLocalItems)">
\r
292 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
\r
293 <CopyToPublishDirectory>Never</CopyToPublishDirectory>
\r
294 </AllNETCoreCopyLocalItems>
\r
297 <!-- Use 'None' so we can rename files using the 'Link' metadata as necessary -->
\r
298 <None Include="@(AllNETCoreCopyLocalItems)" />
\r
304 ============================================================
\r
305 _ComputeReferenceAssemblies
\r
307 Computes references that are only used at compile-time.
\r
308 ============================================================
\r
310 <Target Name="_ComputeReferenceAssemblies"
\r
311 DependsOnTargets="ResolveAssemblyReferences">
\r
314 <_FrameworkReferenceAssemblies Include="@(ReferencePath)"
\r
315 Condition="%(ReferencePath.FrameworkFile) == 'true' or
\r
316 %(ReferencePath.ResolvedFrom) == 'ImplicitlyExpandDesignTimeFacades'" />
\r
319 "ReferenceOnly" assemblies are assemblies that are only used at compile-time, and they can't be resolved
\r
320 by the normal compile-assembly resolvers at runtime:
\r
322 2. NuGet/Package layout
\r
323 3. ProgramFiles\Reference Assemblies
\r
324 These assemblies need to be copied to the 'refs' folder for both build and publish.
\r
326 <_ReferenceOnlyAssemblies Include="@(ReferencePath)"
\r
327 Exclude="@(_FrameworkReferenceAssemblies)"
\r
328 Condition="%(ReferencePath.CopyLocal) != 'true' and
\r
329 %(ReferencePath.NuGetSourceType) == ''" />
\r
331 <_ReferenceAssemblies Include="@(_FrameworkReferenceAssemblies)" />
\r
332 <_ReferenceAssemblies Include="@(_ReferenceOnlyAssemblies)" />
\r
338 ============================================================
\r
341 The ProcessStart information that can be used to run this project.
\r
342 ============================================================
\r
346 <RunWorkingDirectory Condition="'$(RunWorkingDirectory)' == ''">$(StartWorkingDirectory)</RunWorkingDirectory>
\r
350 <When Condition="'$(StartAction)' == 'Program'">
\r
352 <RunCommand Condition="'$(RunCommand)' == ''">$(StartProgram)</RunCommand>
\r
353 <RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
\r
357 <When Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_IsExecutable)' == 'true'">
\r
358 <PropertyGroup Condition="'$(SelfContained)' != 'true'">
\r
359 <!-- TODO: https://github.com/dotnet/sdk/issues/20 Need to get the DotNetHost path from MSBuild -->
\r
360 <RunCommand Condition="'$(RunCommand)' == ''">dotnet</RunCommand>
\r
362 <_NetCoreRunArguments>exec "$(TargetPath)"</_NetCoreRunArguments>
\r
363 <RunArguments Condition="'$(RunArguments)' == '' and '$(StartArguments)' != ''">$(_NetCoreRunArguments) $(StartArguments)</RunArguments>
\r
364 <RunArguments Condition="'$(RunArguments)' == ''">$(_NetCoreRunArguments)</RunArguments>
\r
367 <PropertyGroup Condition="'$(SelfContained)' == 'true'">
\r
368 <RunCommand Condition="'$(RunCommand)' == ''">$(TargetDir)$(AssemblyName)$(_NativeExecutableExtension)</RunCommand>
\r
369 <RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
\r
373 <When Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(_IsExecutable)' == 'true'">
\r
375 <RunCommand Condition="'$(RunCommand)' == ''">$(TargetPath)</RunCommand>
\r
376 <RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
\r
382 <!-- Ensure $(RunWorkingDirectory) is a full path -->
\r
383 <RunWorkingDirectory Condition="'$(RunWorkingDirectory)' != '' and '$([System.IO.Path]::IsPathRooted($(RunWorkingDirectory)))' != 'true'">$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(RunWorkingDirectory)'))))</RunWorkingDirectory>
\r
387 ============================================================
\r
388 CoreGenerateSatelliteAssemblies
\r
389 ============================================================
\r
392 <CreateSatelliteAssembliesDependsOn>
\r
393 $(CreateSatelliteAssembliesDependsOn);
\r
394 CoreGenerateSatelliteAssemblies
\r
395 </CreateSatelliteAssembliesDependsOn>
\r
398 <Target Name="CoreGenerateSatelliteAssemblies"
\r
399 DependsOnTargets="ResolveAssemblyReferences;GenerateAssemblyInfo"
\r
400 Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
\r
401 Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll"
\r
402 Condition="'@(_SatelliteAssemblyResourceInputs)' != '' and '$(GenerateSatelliteAssembliesForCore)' == 'true' ">
\r
404 <MakeDir Directories="@(_SatelliteAssemblyResourceInputs->'$(IntermediateOutputPath)%(Culture)')" />
\r
407 <_AssemblyInfoFile>$(IntermediateOutputPath)%(_SatelliteAssemblyResourceInputs.Culture)\$(TargetName).resources.cs</_AssemblyInfoFile>
\r
408 <_OutputAssembly>$(IntermediateOutputPath)%(_SatelliteAssemblyResourceInputs.Culture)\$(TargetName).resources.dll</_OutputAssembly>
\r
412 <SatelliteAssemblyAttribute Include="@(AssemblyAttribute)" />
\r
413 <SatelliteAssemblyAttribute Include="System.Reflection.AssemblyCultureAttribute" Condition="'%(_SatelliteAssemblyResourceInputs.Culture)' != ''">
\r
414 <_Parameter1>%(_SatelliteAssemblyResourceInputs.Culture)</_Parameter1>
\r
415 </SatelliteAssemblyAttribute>
\r
418 <WriteCodeFragment AssemblyAttributes="@(SatelliteAssemblyAttribute)" Language="$(Language)" OutputFile="$(_AssemblyInfoFile)">
\r
419 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
\r
420 </WriteCodeFragment>
\r
422 <Csc Resources="@(_SatelliteAssemblyResourceInputs)"
\r
423 Sources="$(_AssemblyInfoFile)"
\r
424 OutputAssembly="$(_OutputAssembly)"
\r
425 References="@(ReferencePath)"
\r
426 KeyContainer="$(KeyContainerName)"
\r
427 KeyFile="$(KeyOriginatorFile)"
\r
428 PublicSign="$(PublicSign)"
\r
429 DelaySign="$(DelaySign)"
\r
430 Deterministic="$(Deterministic)"
\r
431 TargetType="Library"
\r
432 ToolExe="$(CscToolExe)"
\r
433 ToolPath="$(CscToolPath)">
\r
435 <Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
\r
440 ============================================================
\r
441 _DefaultMicrosoftNETPlatformLibrary
\r
443 .NET Core apps can have shared frameworks that are pre-installed on the target machine, thus the app is "portable"
\r
444 to any machine that already has the shared framework installed. In order to enable this, a "platform" library
\r
445 has to be declared. The platform library and its dependencies will be excluded from the runtime assemblies.
\r
446 ============================================================
\r
448 <Target Name="_DefaultMicrosoftNETPlatformLibrary">
\r
450 <PropertyGroup Condition="'$(MicrosoftNETPlatformLibrary)' == ''">
\r
451 <MicrosoftNETPlatformLibrary Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">Microsoft.NETCore.App</MicrosoftNETPlatformLibrary>
\r
457 ============================================================
\r
458 GetAllRuntimeIdentifiers
\r
459 ============================================================
\r
461 <Target Name="GetAllRuntimeIdentifiers"
\r
462 Returns="$(RuntimeIdentifiers);$(RuntimeIdentifier)" />
\r
465 ============================================================
\r
466 Project Capabilities
\r
467 ============================================================
\r
470 <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_IsExecutable)' == 'true'">
\r
471 <ProjectCapability Include="CrossPlatformExecutable" />
\r
474 <!-- Reference Manager capabilities -->
\r
475 <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
\r
476 <ProjectCapability Remove="ReferenceManagerAssemblies" />
\r
477 <ProjectCapability Remove="ReferenceManagerCOM" />
\r
480 <!-- Publish capabilities -->
\r
482 <ProjectCapability Include="FolderPublish" />
\r
485 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DisableStandardFrameworkResolution.targets" Condition="'$(DisableStandardFrameworkResolution)' == 'true'" />
\r
486 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.GenerateAssemblyInfo.targets" />
\r
487 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.ComposeStore.targets" />
\r
488 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.CrossGen.targets" />
\r
489 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Publish.targets" />
\r
490 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PreserveCompilationContext.targets" />
\r
491 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.ConflictResolution.targets" />
\r
492 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.CSharp.targets" Condition="'$(Language)' == 'C#'" />
\r
493 <Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.VisualBasic.targets" Condition="'$(Language)' == 'VB'" />
\r