-
Notifications
You must be signed in to change notification settings - Fork 109
Conversation
build/repo.targets
Outdated
@@ -69,7 +69,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageStoreManifestFiles Include="$(PackageCacheOutputPath)**\artifact.xml"> | |||
<DestinationFile>manifest.$(RID).xml</DestinationFile> | |||
<DestinationFile>aspnetcore.manifest.$(RID).xml</DestinationFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to match what I put in the issue, i.e. aspnetcore-store-$(VERSION)-$(RID).xml
438cf99
to
f35f450
Compare
build/repo.targets
Outdated
@@ -69,7 +76,8 @@ | |||
|
|||
<ItemGroup> | |||
<PackageStoreManifestFiles Include="$(PackageCacheOutputPath)**\artifact.xml"> | |||
<DestinationFile>manifest.$(RID).xml</DestinationFile> | |||
<TimestampDestinationFile>aspnetcore-store-$(TimestampVersion)-$(RID).xml</TimestampDestinationFile> | |||
<NoTimestampDestinationFile>aspnetcore-store-$(NoTimestampVersion)-$(RID).xml</NoTimestampDestinationFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this isn't needed, we only produce the Timestamp package here. I need to update Coherence-Signed which hacks out a NoTimestamp version. https://github.com/aspnet/Coherence-Signed/blob/dev/dnx.msbuild#L482
</PropertyGroup> | ||
|
||
<Exec Command="powershell.exe -command "(Get-Content $(ManifestTargetsFile)).replace('__MANIFEST_VERSION__','$(VersionPrefix)-$(VersionSuffix)') | Set-Content $(ManifestTargetsFile)"" Condition="'$(OS)' == 'Windows_NT'"/> | ||
<Exec Command="sed -i -e "s/__MANIFEST_VERSION__/$(VersionPrefix)-$(VersionSuffix)/g" $(ManifestTargetsFile)" Condition="'$(OS)' != 'Windows_NT'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not technically required since we only build the packages on windows in our CI
@@ -22,4 +22,13 @@ | |||
<Content Include="build\**\*.targets" PackagePath="%(Identity)" /> | |||
</ItemGroup> | |||
|
|||
<Target Name="UpdateManifestVersionNumbers" BeforeTargets="PrepareForBuild"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think PackageDependsOn is a better strategy for achieving what we want here. Will test it out.
@@ -4,7 +4,7 @@ | |||
</PropertyGroup> | |||
|
|||
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'"> | |||
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)manifest.win7-x64.xml;$(MSBuildThisFileDirectory)manifest.win7-x86.xml;$(MSBuildThisFileDirectory)manifest.osx-x64.xml;$(MSBuildThisFileDirectory)manifest.linux-x64.xml</TargetManifestFiles> | |||
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-win7-x64.xml;$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-win7-x86.xml;$aspnetcore-store-__MANIFEST_VERSION__-osx-x64.xml;$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-linux-x64.xml</TargetManifestFiles> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use glob instead so you don't have to worry about sed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you just add this to the TargetManifestFileList
item group.
<ItemGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'">
<TargetManifestFileList Include="$(MSBuildThisFileDirectory)aspnetcore-store-*.xml" />
</ItemGroup >
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be better actually. I'll go with that and try out the final packages to see if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeing the errors during publish, seems like globs do not work:
(RunResolvePublishAssemblies target) ->
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: The "ResolvePublishAssemblies" task failed unexpectedly. [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: System.Xml.XmlException: Cannot open 'file:///C:/Users/johluo/.nuget/packages/microsoft.aspnetcore.all/2.0.0-preview2-t0048339c4/build/*.xml'. The Uri parameter must be a file system relative or absolute path. ---> System.ArgumentException: Illegal characters in path. [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: Parameter name: path [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.IO.Path.GetFullPath(String path) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlSystemPathResolver.GetEntity(Uri uri, String role, Type typeOfObjectToReturn) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: --- End of inner exception stack trace --- [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlSystemPathResolver.GetEntity(Uri uri, String role, Type typeOfObjectToReturn) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlTextReaderImpl.FinishInitUriString() [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at Microsoft.NET.Build.Tasks.StoreArtifactParser.Parse(String filterFile) [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePublishAssemblies.ExecuteCore() [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\gh\tp\TestStore\TestStore.csproj]
C:\Users\johluo\.dotnet\x64\sdk\2.0.0-preview2-006127\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets(252,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [C:\gh\tp\TestStore\TestStore.csproj]
Took a brief look but couldn't figure out why MSBuild isn't working as I expected. Will revert to using explicit file names.
<ManifestTargetsFile>$(MSBuildThisFileDirectory)build\PublishWithAspNetCoreTargetManifest.targets</ManifestTargetsFile> | ||
</PropertyGroup> | ||
|
||
<Exec Command="powershell.exe -command "(Get-Content $(ManifestTargetsFile)).replace('__MANIFEST_VERSION__','$(VersionPrefix)-$(VersionSuffix)') | Set-Content $(ManifestTargetsFile)"" Condition="'$(OS)' == 'Windows_NT'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yikes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the easiest way I could put the exact version number inside the the target file.
Globs don't work in PropertyGroup. You need to use ItemGroup. Try this code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked in person. It looks like we'll need an SDK with dotnet/sdk#1164 first before the ItemGroup approach will work. In the meantime, let's go with this. I'm not sure how fast we'll get a version of the SDK that includes dotnet/sdk#1245 or if it will make it into preview2
eb7eb05
to
1619166
Compare
Addresses #124 to clarify which manifests are problematic when error message is displayed.