115115 <EmbeddedResource Include =" lang\bvnerrorhandlerEN.xml" />
116116 <EmbeddedResource Include =" lang\bvnerrorhandlerNO.xml" />
117117 <EmbeddedResource Include =" lang\bvnerrorhandlerSV.xml" />
118- <EmbeddedResource Include =" lang\RedirectsGadget.xml" >
119- <SubType >Designer</SubType >
120- </EmbeddedResource >
118+ <EmbeddedResource Include =" lang\RedirectsGadget.xml" />
121119 <None Include =" ClientResources\Content\Images\BaseSprite.png" />
122120 <None Include =" ClientResources\Content\Images\Gradients.png" />
123121 <None Include =" ClientResources\Content\Images\gray_border.png" />
331329 <ItemGroup >
332330 <Folder Include =" Bvn\FileNotFound\Configuration\" />
333331 </ItemGroup >
332+ <PropertyGroup >
333+ <SolutionDir >$(ProjectDir)</SolutionDir >
334+ </PropertyGroup >
334335 <PropertyGroup >
335336 <VisualStudioVersion Condition =" '$(VisualStudioVersion)' == ''" >10.0</VisualStudioVersion >
336337 <VSToolsPath Condition =" '$(VSToolsPath)' == ''" >$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath >
337338 </PropertyGroup >
338- <Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
339+ <PropertyGroup >
340+ <RestorePackages >true</RestorePackages >
341+ </PropertyGroup >
339342 <PropertyGroup >
340343 <PreBuildEvent >
341344 </PreBuildEvent >
345348 <ProjectExtensions />
346349 <Import Project =" $(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition =" '$(VSToolsPath)' != ''" />
347350 <Import Project =" $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition =" false" />
351+
348352 <!-- Used below, so define it first -->
349353 <PropertyGroup >
350- <SolutionDir >$(ProjectDir)</SolutionDir >
354+ <ProjectDir Condition =" '$(ProjectDir)' == ''" >$(MSBuildProjectDirectory)</ProjectDir >
355+ <SolutionDir Condition =" '$(SolutionDir)' == ''" >$(ProjectDir)</SolutionDir >
351356 <!-- NOTE! This is different between cms versions, the zip file needs to be named the same in the package -->
357+ <OutDir >$(OutputPath)</OutDir >
352358 <zipFile >$(OutDir)\BVNetwork.404Handler.zip</zipFile >
353359 </PropertyGroup >
360+ <Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
354361 <!-- This holds the version of the package -->
355362 <Import Project =" $(SolutionDir)\$(ProjectName).Version.targets" Condition =" Exists('$(SolutionDir)\$(ProjectName).Version.targets')" />
363+ <Import Project =" $(SolutionDir)\.nuget\nuget.targets" />
364+ <Import Project =" $(ProjectDir)\packageTools.targets" />
356365 <!-- Pack -->
357- <Import Project = " $(SolutionDir)\packageTools.targets " Condition =" Exists( '$(SolutionDir)\packageTools.targets') " / >
358- < Target Name = " CreateNugetPackage " AfterTargets = " Build " Condition = " '$(Configuration)' == 'Release' " >
366+ <Target Name = " CreateNugetPackage " AfterTargets = " Build;Rebuild " Condition =" '$(Configuration)' == 'Release' " >
367+ < Message Text = " Creating Nuget Package " / >
359368 <!-- Create the Versioned out dir for the client resources-->
360369 <!-- Copy -->
361370 <ItemGroup >
362- <ClientResources Include =" $(SolutionDir )\ClientResources\**\*" />
363- <Views Include =" $(SolutionDir )\Views\**\*" />
371+ <ClientResources Include =" $(ProjectDir )\ClientResources\**\*" />
372+ <Views Include =" $(ProjectDir )\Views\**\*" />
364373 </ItemGroup >
365- <Copy SourceFiles =" $(SolutionDir )\module.config" DestinationFolder =" $(TmpOutDir)\content" />
374+ <Copy SourceFiles =" $(ProjectDir )\module.config" DestinationFolder =" $(TmpOutDir)\content" />
366375 <Copy SourceFiles =" @(ClientResources)" DestinationFiles =" @(ClientResources -> '$(TmpOutDir)\content\ClientResources\%(RecursiveDir)%(Filename)%(Extension)')" />
367376 <Copy SourceFiles =" @(Views)" DestinationFiles =" @(Views -> '$(TmpOutDir)\content\Views\%(RecursiveDir)%(Filename)%(Extension)')" />
368377 <!-- Create the Zip file -->
373382 <RemoveDir Directories =" $(TmpOutDir)" />
374383 <Delete Files =" $(zipFile)" />
375384 </Target >
376- <Import Project =" $(SolutionDir)\.nuget\NuGet.targets" Condition =" Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
377- <Target Name =" EnsureNuGetPackageBuildImports" BeforeTargets =" PrepareForBuild" >
378- <PropertyGroup >
379- <ErrorText >This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText >
380- </PropertyGroup >
381- <Error Condition =" !Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text =" $([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
382- </Target >
383385</Project >
0 commit comments