115
115
<EmbeddedResource Include =" lang\bvnerrorhandlerEN.xml" />
116
116
<EmbeddedResource Include =" lang\bvnerrorhandlerNO.xml" />
117
117
<EmbeddedResource Include =" lang\bvnerrorhandlerSV.xml" />
118
- <EmbeddedResource Include =" lang\RedirectsGadget.xml" >
119
- <SubType >Designer</SubType >
120
- </EmbeddedResource >
118
+ <EmbeddedResource Include =" lang\RedirectsGadget.xml" />
121
119
<None Include =" ClientResources\Content\Images\BaseSprite.png" />
122
120
<None Include =" ClientResources\Content\Images\Gradients.png" />
123
121
<None Include =" ClientResources\Content\Images\gray_border.png" />
331
329
<ItemGroup >
332
330
<Folder Include =" Bvn\FileNotFound\Configuration\" />
333
331
</ItemGroup >
332
+ <PropertyGroup >
333
+ <SolutionDir >$(ProjectDir)</SolutionDir >
334
+ </PropertyGroup >
334
335
<PropertyGroup >
335
336
<VisualStudioVersion Condition =" '$(VisualStudioVersion)' == ''" >10.0</VisualStudioVersion >
336
337
<VSToolsPath Condition =" '$(VSToolsPath)' == ''" >$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath >
337
338
</PropertyGroup >
338
- <Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
339
+ <PropertyGroup >
340
+ <RestorePackages >true</RestorePackages >
341
+ </PropertyGroup >
339
342
<PropertyGroup >
340
343
<PreBuildEvent >
341
344
</PreBuildEvent >
345
348
<ProjectExtensions />
346
349
<Import Project =" $(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition =" '$(VSToolsPath)' != ''" />
347
350
<Import Project =" $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition =" false" />
351
+
348
352
<!-- Used below, so define it first -->
349
353
<PropertyGroup >
350
- <SolutionDir >$(ProjectDir)</SolutionDir >
354
+ <ProjectDir Condition =" '$(ProjectDir)' == ''" >$(MSBuildProjectDirectory)</ProjectDir >
355
+ <SolutionDir Condition =" '$(SolutionDir)' == ''" >$(ProjectDir)</SolutionDir >
351
356
<!-- NOTE! This is different between cms versions, the zip file needs to be named the same in the package -->
357
+ <OutDir >$(OutputPath)</OutDir >
352
358
<zipFile >$(OutDir)\BVNetwork.404Handler.zip</zipFile >
353
359
</PropertyGroup >
360
+ <Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
354
361
<!-- This holds the version of the package -->
355
362
<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" />
356
365
<!-- 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 " / >
359
368
<!-- Create the Versioned out dir for the client resources-->
360
369
<!-- Copy -->
361
370
<ItemGroup >
362
- <ClientResources Include =" $(SolutionDir )\ClientResources\**\*" />
363
- <Views Include =" $(SolutionDir )\Views\**\*" />
371
+ <ClientResources Include =" $(ProjectDir )\ClientResources\**\*" />
372
+ <Views Include =" $(ProjectDir )\Views\**\*" />
364
373
</ItemGroup >
365
- <Copy SourceFiles =" $(SolutionDir )\module.config" DestinationFolder =" $(TmpOutDir)\content" />
374
+ <Copy SourceFiles =" $(ProjectDir )\module.config" DestinationFolder =" $(TmpOutDir)\content" />
366
375
<Copy SourceFiles =" @(ClientResources)" DestinationFiles =" @(ClientResources -> '$(TmpOutDir)\content\ClientResources\%(RecursiveDir)%(Filename)%(Extension)')" />
367
376
<Copy SourceFiles =" @(Views)" DestinationFiles =" @(Views -> '$(TmpOutDir)\content\Views\%(RecursiveDir)%(Filename)%(Extension)')" />
368
377
<!-- Create the Zip file -->
373
382
<RemoveDir Directories =" $(TmpOutDir)" />
374
383
<Delete Files =" $(zipFile)" />
375
384
</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 >
383
385
</Project >
0 commit comments