Skip to content

Unittest for bug when a project has dependencies #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,22 @@ projects/packages/*
projects/vs2008/slnStartupProject/obj/
projects/vs2008/slnStartupProjectLibrary/obj/
projects/vs2013/slnStartupProject/obj/
projects/vs2013/slnStartupProjectLibrary/obj/
projects/vs2013/slnStartupProjectLibrary/obj/
/tests/data/ExampleProject/Debug
/tests/data/ExampleProject/Release
/tests/data/ExampleProject/x64
/tests/data/ExampleProject/ExampleLibrary/x64
/tests/data/ExampleProject/ExampleLibrary/Debug
/tests/data/ExampleProject/ExampleLibrary/Release
/tests/data/ExampleProject/ExampleProject/x64
/tests/data/ExampleProject/ExampleProject/Debug
/tests/data/ExampleProject/ExampleProject/Release
/tests/data/ExampleProject/.vs
/projects/vs2017/slnStartupProjectLibrary/Properties
/projects/vs2017/slnStartupProjectLibrary/bin
/projects/vs2017/slnStartupProjectLibrary/obj
/projects/vs2017/slnStartupProject/obj
/projects/vs2017/slnStartupProject/Properties
/tests/data/ExampleProject/ExampleProjectTemp.sln
/projects/vs2017/slnStartupProjectUnitTest/obj
/projects/vs2017/slnStartupProjectUnitTest/bin
33 changes: 33 additions & 0 deletions projects/slnStartupProject-vs2017.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "slnStartupProject", "vs2017\slnStartupProject\slnStartupProject.csproj", "{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "slnStartupProjectLibrary", "vs2017\slnStartupProjectLibrary\slnStartupProjectLibrary.csproj", "{412D2B0E-7C81-424C-ADE0-4E7F7D6DA45E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "slnStartupProjectUnitTest", "vs2017\slnStartupProjectUnitTest\slnStartupProjectUnitTest.csproj", "{2003A5E1-C1F2-4998-9CD3-0674220FCE56}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}.Release|Any CPU.Build.0 = Release|Any CPU
{412D2B0E-7C81-424C-ADE0-4E7F7D6DA45E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{412D2B0E-7C81-424C-ADE0-4E7F7D6DA45E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{412D2B0E-7C81-424C-ADE0-4E7F7D6DA45E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{412D2B0E-7C81-424C-ADE0-4E7F7D6DA45E}.Release|Any CPU.Build.0 = Release|Any CPU
{2003A5E1-C1F2-4998-9CD3-0674220FCE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2003A5E1-C1F2-4998-9CD3-0674220FCE56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2003A5E1-C1F2-4998-9CD3-0674220FCE56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2003A5E1-C1F2-4998-9CD3-0674220FCE56}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
78 changes: 78 additions & 0 deletions projects/vs2017/slnStartupProject/slnStartupProject.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DC1C3B41-C7E2-41A6-AE51-75DCEE7E2927}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>slnStartupProject</RootNamespace>
<AssemblyName>slnStartupProject</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\src\slnStartupProjectLibrary\Parser.cs">
<Link>Parser.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProjectLibrary\Project.cs">
<Link>Project.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProject\Program.cs">
<Link>Program.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProject\Properties\AssemblyInfo.cs">
<Link>AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
18 changes: 18 additions & 0 deletions projects/vs2017/slnStartupProject/slnStartupProject.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>michaK</authors>
<owners>$author$</owners>
<licenseUrl>https://raw.githubusercontent.com/michaKFromParis/slnStartupProject/master/LICENCE</licenseUrl>
<projectUrl>https://github.com/michaKFromParis/slnStartupProject</projectUrl>
<iconUrl>https://raw.githubusercontent.com/michaKFromParis/slnStartupProject/master/nuget/slnStartupProject.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Initial nuget release</releaseNotes>
<copyright>Copyright michaK 2015</copyright>
<tags>Visual Studio sln Solution Startup Project cmake C++ C# .NET</tags>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>412d2b0e-7c81-424c-ade0-4e7f7d6da45e</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>slnStartupProjectLibrary</RootNamespace>
<AssemblyName>slnStartupProjectLibrary</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\src\slnStartupProjectLibrary\Parser.cs">
<Link>Parser.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProjectLibrary\Project.cs">
<Link>Project.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProjectLibrary\Properties\AssemblyInfo.cs">
<Link>AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>michaK</authors>
<owners>$author$</owners>
<licenseUrl>https://raw.githubusercontent.com/michaKFromParis/slnStartupProject/master/LICENCE</licenseUrl>
<projectUrl>https://github.com/michaKFromParis/slnStartupProject</projectUrl>
<iconUrl>https://raw.githubusercontent.com/michaKFromParis/slnStartupProject/master/nuget/slnStartupProject.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Initial nuget release</releaseNotes>
<copyright>Copyright michaK 2015</copyright>
<tags>Visual Studio sln Solution Startup Project cmake C++ C# .NET</tags>
</metadata>
</package>
6 changes: 6 additions & 0 deletions projects/vs2017/slnStartupProjectUnitTest/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.6.1" targetFramework="net35" />
<package id="NUnit.ConsoleRunner" version="3.6.1" targetFramework="net35" />
<package id="NUnit3TestAdapter" version="3.7.0" targetFramework="net35" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2003A5E1-C1F2-4998-9CD3-0674220FCE56}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>slnStartupProjectUnitTest</RootNamespace>
<AssemblyName>slnStartupProjectUnitTest</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.6.1\lib\net35\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\src\slnStartupProjectUnitTest\UnitTest.cs">
<Link>UnitTest.cs</Link>
</Compile>
<Compile Include="..\..\..\src\slnStartupProjectUnitTest\Properties\AssemblyInfo.cs">
<Link>AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\slnStartupProjectLibrary\slnStartupProjectLibrary.csproj">
<Project>{412d2b0e-7c81-424c-ade0-4e7f7d6da45e}</Project>
<Name>slnStartupProjectLibrary</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
16 changes: 16 additions & 0 deletions src/slnStartupProjectUnitTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("slnStartupProjectUnitTest")]
[assembly: AssemblyDescription("A .NET library to set the default StartUp project of a Visual Studio solution file")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("iVoltage")]
[assembly: AssemblyProduct("sln StartUp Project UnitTest")]
[assembly: AssemblyCopyright("Copyright © Michel Courtine 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("2003a5e1-c1f2-4998-9cd3-0674220fce56")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
Loading