Workaround quirks in NuGet
* Disable package analysis because it incorrectly issues NU5109 on macOS, but not windows * Normalize file paths because if you mix slashes, NuGet will just skip the entire folder * Normalize the project path given to restore. If it not normalized, restore skips the project and issues a warning
This commit is contained in:
parent
dbc28c523e
commit
77a3089c8d
|
|
@ -2,7 +2,8 @@
|
|||
<Import Project="SharedFx.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<UnitTestFxProject>$(RepositoryRoot)\src\Framework\Framework.UnitTests\Framework.UnitTests.csproj</UnitTestFxProject>
|
||||
<UnitTestFxProject>$(RepositoryRoot)src\Framework\Framework.UnitTests\Framework.UnitTests.csproj</UnitTestFxProject>
|
||||
<UnitTestFxProject>$([MSBuild]::NormalizePath($(UnitTestFxProject)))</UnitTestFxProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ This targets file should only be imported by .shfxproj files.
|
|||
<PublishDir Condition=" '$(CrossGenOutput)' != 'true' ">$(OutputPath)</PublishDir>
|
||||
<PublishDir Condition=" '$(CrossGenOutput)' == 'true' ">$(IntermediateOutputPath)u\</PublishDir>
|
||||
|
||||
<!-- If symbols generation is disabled, there is no use in producing a symbols.nupkg files. -->
|
||||
<IncludeSymbols Condition="'$(CrossgenSymbolsOutput)' == 'false'">false</IncludeSymbols>
|
||||
|
||||
<MetadataOutputPath Condition="'$(MetadataOutputPath)' == ''">$(OutputPath)files\</MetadataOutputPath>
|
||||
<SymbolsOutputPath Condition="'$(SymbolsOutputPath)' == ''">$(OutputPath)symbols\</SymbolsOutputPath>
|
||||
<NativeAssetsOutputPath Condition="'$(NativeAssetsOutputPath)' == ''">$(OutputPath)native\</NativeAssetsOutputPath>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\fx\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
|
||||
|
||||
<CrossgenOutput Condition="'$(SharedFxRid)' == 'linux-arm'">false</CrossgenOutput>
|
||||
<CrossgenSymbolOutput Condition=" '$(CrossgenOutput)' == 'false' OR '$(SharedFxRid)' == 'osx-x64'">false</CrossgenSymbolOutput>
|
||||
<CrossgenSymbolsOutput Condition=" '$(CrossgenOutput)' == 'false' OR '$(SharedFxRid)' == 'osx-x64'">false</CrossgenSymbolsOutput>
|
||||
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<NuspecFile>$(MSBuildThisFileDirectory)runtime.fx.nuspec</NuspecFile>
|
||||
<PackageTags>aspnetcore;shared-framework</PackageTags>
|
||||
<!-- Workaround for invalid NU5109 error when packing on macOS. -->
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
repositoryCommit=$(RepositoryCommit);
|
||||
copyright=$(Copyright);
|
||||
targetFramework=$(TargetFramework);
|
||||
symbolsAssets=$(SymbolsOutputPath);
|
||||
nativeAssets=$(NativeAssetsOutputPath);
|
||||
runtimeAssets=$(RuntimeAssetsOutputPath);
|
||||
symbolsAssets=$([MSBuild]::NormalizeDirectory($(SymbolsOutputPath)));
|
||||
nativeAssets=$([MSBuild]::NormalizeDirectory($(NativeAssetsOutputPath)));
|
||||
runtimeAssets=$([MSBuild]::NormalizeDirectory($(RuntimeAssetsOutputPath)));
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
<serviceable>true</serviceable>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="$symbolsAssets$" target="runtimes\$rid$\lib\$targetFramework$\" />
|
||||
<file src="$runtimeAssets$" target="runtimes\$rid$\lib\$targetFramework$\" />
|
||||
<file src="$nativeAssets$" target="runtimes\$rid$\native\" />
|
||||
<file src="$symbolsAssets$" target="runtimes/$rid$/lib/$targetFramework$/" />
|
||||
<file src="$runtimeAssets$" target="runtimes/$rid$/lib/$targetFramework$/" />
|
||||
<file src="$nativeAssets$" target="runtimes/$rid$/native/" />
|
||||
<!-- This is a dummy reference which prevents NuGet from adding any compilation references when this package is imported. -->
|
||||
<file src="_._" target="ref\netstandard\" />
|
||||
<file src="_._" target="ref/netstandard/" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
|||
Loading…
Reference in New Issue