Adding Packages global and added nuget lib to fix restore.

This commit is contained in:
Michael J. Manley 2024-02-09 16:32:27 -08:00
parent 211153c976
commit 771e617624
2 changed files with 74 additions and 68 deletions

View File

@ -1,38 +1,38 @@
<Project> <Project>
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation"> <Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">
<Exec Command="git describe --long --always --dirty --exclude=* --abbrev=8" ConsoleToMSBuild="True" <Exec Command="git describe --long --always --dirty --exclude=* --abbrev=8" ConsoleToMSBuild="True"
IgnoreExitCode="False" ContinueOnError="True"> IgnoreExitCode="False" ContinueOnError="True">
<Output PropertyName="SourceRevisionIdOutput" TaskParameter="ConsoleOutput" /> <Output PropertyName="SourceRevisionIdOutput" TaskParameter="ConsoleOutput" />
<Output PropertyName="SourceRevisionIdErrorCode" TaskParameter="ExitCode" /> <Output PropertyName="SourceRevisionIdErrorCode" TaskParameter="ExitCode" />
</Exec> </Exec>
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="True" IgnoreExitCode="False" ContinueOnError="True"> <Exec Command="git rev-parse HEAD" ConsoleToMSBuild="True" IgnoreExitCode="False" ContinueOnError="True">
<Output PropertyName="SourceRevisionIdFullOutput" TaskParameter="ConsoleOutput" /> <Output PropertyName="SourceRevisionIdFullOutput" TaskParameter="ConsoleOutput" />
<Output PropertyName="SourceRevisionIdFullErrorCode" TaskParameter="ExitCode" /> <Output PropertyName="SourceRevisionIdFullErrorCode" TaskParameter="ExitCode" />
</Exec> </Exec>
<Exec Command="git rev-parse --abbrev-ref HEAD" ConsoleToMSBuild="True" IgnoreExitCode="False" <Exec Command="git rev-parse --abbrev-ref HEAD" ConsoleToMSBuild="True" IgnoreExitCode="False"
ContinueOnError="True"> ContinueOnError="True">
<Output PropertyName="SourceBranchOutput" TaskParameter="ConsoleOutput" /> <Output PropertyName="SourceBranchOutput" TaskParameter="ConsoleOutput" />
<Output PropertyName="SourceBranchErrorCode" TaskParameter="ExitCode" /> <Output PropertyName="SourceBranchErrorCode" TaskParameter="ExitCode" />
</Exec> </Exec>
<PropertyGroup> <PropertyGroup>
<GitRepo>false</GitRepo> <GitRepo>false</GitRepo>
<SourceRevisionId></SourceRevisionId> <SourceRevisionId></SourceRevisionId>
<SourceRevisionIdFull></SourceRevisionIdFull> <SourceRevisionIdFull></SourceRevisionIdFull>
<SourceBranch></SourceBranch> <SourceBranch></SourceBranch>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(SourceRevisionIdErrorCode)' == '0'"> <PropertyGroup Condition="'$(SourceRevisionIdErrorCode)' == '0'">
<GitRepo>true</GitRepo> <GitRepo>true</GitRepo>
<SourceRevisionId>$(SourceRevisionIdOutput)</SourceRevisionId> <SourceRevisionId>$(SourceRevisionIdOutput)</SourceRevisionId>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(SourceRevisionIdFullErrorCode)' == '0'"> <PropertyGroup Condition="'$(SourceRevisionIdFullErrorCode)' == '0'">
<SourceRevisionIdFull>$(SourceRevisionIdFullOutput)</SourceRevisionIdFull> <SourceRevisionIdFull>$(SourceRevisionIdFullOutput)</SourceRevisionIdFull>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(SourceBranchErrorCode)' == '0'"> <PropertyGroup Condition="'$(SourceBranchErrorCode)' == '0'">
<SourceBranch>$(SourceBranchOutput)</SourceBranch> <SourceBranch>$(SourceBranchOutput)</SourceBranch>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GitData> <GitData>
<![CDATA[ <![CDATA[
using System%3B using System%3B
internal partial class ThisAssembly internal partial class ThisAssembly
{ {
@ -44,9 +44,9 @@ internal partial class ThisAssembly
} }
} }
]]> ]]>
</GitData> </GitData>
<InformationalData> <InformationalData>
<![CDATA[ <![CDATA[
using System%3B using System%3B
internal partial class ThisAssembly internal partial class ThisAssembly
{ {
@ -59,35 +59,39 @@ internal partial class ThisAssembly
} }
} }
]]> ]]>
</InformationalData> </InformationalData>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GitGeneratedFilePath>$(IntermediateOutputPath)GitAssemblyInformation.g.cs</GitGeneratedFilePath> <GitGeneratedFilePath>$(IntermediateOutputPath)GitAssemblyInformation.g.cs</GitGeneratedFilePath>
<InformationalGeneratedFilePath>$(IntermediateOutputPath)InformationalAssemblyInformation.g.cs</InformationalGeneratedFilePath> <InformationalGeneratedFilePath>$(IntermediateOutputPath)InformationalAssemblyInformation.g.cs</InformationalGeneratedFilePath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="$(GitGeneratedFilePath)" /> <Compile Include="$(GitGeneratedFilePath)" />
<FileWrites Include="$(GitGeneratedFilePath)" /> <FileWrites Include="$(GitGeneratedFilePath)" />
<Compile Include="$(InformationalGeneratedFilePath)" /> <Compile Include="$(InformationalGeneratedFilePath)" />
<FileWrites Include="$(InformationalGeneratedFilePath)" /> <FileWrites Include="$(InformationalGeneratedFilePath)" />
</ItemGroup> </ItemGroup>
<WriteLinesToFile Lines="$(GitData)" File="$(GitGeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" /> <WriteLinesToFile Lines="$(GitData)" File="$(GitGeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
<WriteLinesToFile Lines="$(InformationalData)" File="$(InformationalGeneratedFilePath)" <WriteLinesToFile Lines="$(InformationalData)" File="$(InformationalGeneratedFilePath)"
WriteOnlyWhenDifferent="true" Overwrite="true" /> WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target> </Target>
<PropertyGroup> <PropertyGroup>
<AssemblyTitle>$(Title)</AssemblyTitle> <AssemblyTitle>$(Title)</AssemblyTitle>
<AssemblyDescription>$(Description)</AssemblyDescription> <AssemblyDescription>$(Description)</AssemblyDescription>
<Copyright>Copyright © XCP-ng</Copyright> <Copyright>Copyright © XCP-ng</Copyright>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/xcp-ng/xenadmin</RepositoryUrl> <RepositoryUrl>https://github.com/xcp-ng/xenadmin</RepositoryUrl>
<RevisionNumber>$([System.DateTime]::Now.ToString("yy"))$([System.DateTime]::Now.DayOfYear.ToString("D3"))</RevisionNumber> <RevisionNumber>$([System.DateTime]::Now.ToString("yy"))$([System.DateTime]::Now.DayOfYear.ToString("D3"))</RevisionNumber>
<Authors>XCP-ng</Authors> <Authors>XCP-ng</Authors>
<Product>XCP-ng Center</Product> <Product>XCP-ng Center</Product>
<Version>0.0.0.$(RevisionNumber)</Version> <Version>0.0.0.$(RevisionNumber)</Version>
<FileVersion>0.0.0.$(RevisionNumber)</FileVersion> <FileVersion>0.0.0.$(RevisionNumber)</FileVersion>
<Codename>Medicine Hat</Codename> <Codename>Medicine Hat</Codename>
<Lab>xcpngcenter_main</Lab> <Lab>xcpngcenter_main</Lab>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<RestoreSources>$(RestoreSources);./Packages;https://api.nuget.org/v3/index.json</RestoreSources>
</PropertyGroup>
</Project> </Project>

View File

@ -8,11 +8,13 @@
<ApplicationIcon>AppIcon.ico</ApplicationIcon> <ApplicationIcon>AppIcon.ico</ApplicationIcon>
<Title>XCP-ng Center</Title> <Title>XCP-ng Center</Title>
<Description>XCP-ng Center</Description> <Description>XCP-ng Center</Description>
<RestoreSources>$(RestoreSources);../Packages</RestoreSources>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\XenModel\XenModel.csproj" /> <ProjectReference Include="..\XenModel\XenModel.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MSTSCLib" Version="1.0.0" /> <PackageReference Include="MSTSCLib" Version="1.0.0" />
<PackageReference Include="Microsoft.ReportViewer" Version="9.0.0" /> <PackageReference Include="Microsoft.ReportViewer" Version="9.0.0" />
</ItemGroup> </ItemGroup>