-
-
Notifications
You must be signed in to change notification settings - Fork 120
Conversation
…s 4.0 and 4.5. Also changed the project to support both frameworks.
Great stuff. There's only a couple of problems:
The build fails as follows:
There's also a minor issues with the removal of the And lastly, the next time you do a pull request, create a new branch for whatever work you're doing first, so all future commits won't be included in the same pull request. If you push new code into your master branch now before this pull request is merged, those commits will end up in this pull request, since the pull isn't limited to the commits you have at the time you request it, but will include all changes made to the branch until it is merged. Just FYI. :) |
Good to know about the branch.. This was my first time with github.. I thought only a fork would be enough.. thanks.. ;-) About the , the NuGet was complaining about it when trying to create the package. Forgot to tell.. sorry.. The output path is different for each framework version: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\net45\SharpRaven.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release 4.0|AnyCPU'">
<OutputPath>bin\Release\net40\</OutputPath>
<DefineConstants>TRACE;NET40</DefineConstants>
<DocumentationFile>bin\Release\net40\SharpRaven.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup> That's how the nuget package worked here.. at the build.bat the solution is build twice.. once for framework 4.0 and other for 4.5.. I don't have any experience with TeamCity but I'll take a look.. ;-) []'s |
Hi @asbjornu, Got it how to do it. The build is failing because the project is configured to run with the "Visual Studio (sln)" runner type. This "runner" will compile with the default solution properties and we cannot have more than one default solution property. What we need to do, is to disable this buid step and create another 2 steps with "MSBuild" runner type. For both, the "Build file path" property will be the project file path and the "Command line parameters" will be "/p:Configuration="Release 4.0" for one and "/p:Configuration="Release 4.5" for the other. This way, we'll end up with both builds: At the nuspec file, we'll set the files that this way:
Let's do it!? ;-) []'s |
Added the file build.bat to compile and create the package for framewoks 4.0 and 4.5. Also changed the project to support both frameworks.