Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

MSBuildProcess keeps reappearing

$
0
0

I am quite new to the MSBuild Process and I am stuck on this error for 2 days now. I have a consoletool, which gets called during a build process and is packed into a nuget, so it can easility be used by other projects. The consoletool analyzes used packages in the project where the nuget is included and creates a folder where the console tool places its output. This all works as expected, but the msbuild process never seems to really stop or at least reappears after the execution is finished. I can see, that the folder which is created during the build process just keeps getting recreated again and again. In the windows explorer I can see the processes disappearing just to reappear again. 

Here are all the files, which are involved in my msbuildprocess:

myapp.target

<Project><Import Project="$(MSBuildThisFileDirectory)/../../tools/mytargets.targets" /></Project>

mytargets.targets

<Project><Target Name="check" AfterTargets="CoreCompile"><PropertyGroup><Output>files</Output><Directory>$(MSBuildProjectDirectory)$(Output)</Directory><Exe>dotnet $(MSBuildThisFileDirectory)mytool.dll</Exe><Call>$(Exe) $(MSBuildProjectFullPath) $(Directory)</Call></PropertyGroup><MakeDir Directories="$(Directory)"/><Exec Command="$(Call)" /></Target> </Project>


myapp.nuspec

<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"><metadata><id>testtool</id><version>1.0.0</version><authors>author</authors><description>
          bla</description></metadata><files><file src="lib\netstandard1.0\_._"                                target="/lib/netstandard1.0/" /><file src="build\netstandard1.0\myapp.targets"                  target="/build/netstandard1.0/myapp.targets" /><file src="tools\mytargets.targets"                               target="/tools/" /><file src="$publishdir$\netcoreapp2.1\**\*"                       target="/tools/netcoreapp2.1/" /></files></package>


myapp.csproj

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><AssemblyName>assemblytest</AssemblyName><TargetFramework>netcoreapp2.1</TargetFramework></PropertyGroup><!-- Pack settings --><PropertyGroup><NoPackageAnalysis>true</NoPackageAnalysis><NuspecFile>myapp.nuspec</NuspecFile><IntermediatePackDir>$(MSBuildProjectDirectory)/bin/$(Configuration)/publish/</IntermediatePackDir><PublishDir>$(IntermediatePackDir)$(TargetFramework)/</PublishDir><NuspecProperties>publishDir=$([MSBuild]::NormalizeDirectory($(IntermediatePackDir)))</NuspecProperties></PropertyGroup><!-- Executes /t:Publish for all target frameworks before packing--><Target Name="PublishAll" BeforeTargets="GenerateNuspec"><ItemGroup><_TargetFramework Include="$(TargetFramework)" /></ItemGroup><MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Publish" Properties="TargetFramework=%(_TargetFramework.Identity)" /></Target><ItemGroup><Folder Include="src\" /><Folder Include="tools\netcoreapp2.1\" /></ItemGroup><ItemGroup><PackageReference Include="Microsoft.Build.Framework" Version="16.0.461" /><PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.0.461" /></ItemGroup></Project>

And this is the structure of the project, which produces the nuget package

 myapp
       build
         netstandard1.0
            myapp.targets
       lib
         netstandard1.0
            _._
       src
         program.cs
       tools
         mytargets.targets
         netcoreapp2.1
       myapp.nuspec

The nuget is referenced as usual. I don't really know what to try anymore or how I could further analyze it. I'd be really thankful for some tips :)



Viewing all articles
Browse latest Browse all 2763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>