Skip to content

Commit

Permalink
Fixed an error in the sample resulting in broken includes in the proj…
Browse files Browse the repository at this point in the history
…ects, diverging sample structure and writing output files to the codebase folder
  • Loading branch information
Adam Politanski authored and jspelletier committed Oct 26, 2023
1 parent aab741a commit 683e8b3
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 27 deletions.
2 changes: 1 addition & 1 deletion SamplesDef.json
Expand Up @@ -126,7 +126,7 @@
"Commands":
[
"./RunSharpmake.ps1 -workingDirectory {testFolder} -sharpmakeFile \"CSharpWCF.sharpmake.cs\" -framework {framework}",
"./Compile.ps1 -slnOrPrjFile \"CSharpWCFSolution.vs2015.v4_5_2.sln\" -configuration {configuration} -platform \"Any CPU\" -WorkingDirectory \"{testFolder}/codebase\" -VsVersion {os} -compiler MsBuild"
"./Compile.ps1 -slnOrPrjFile \"CSharpWCFSolution.vs2015.v4_5_2.sln\" -configuration {configuration} -platform \"Any CPU\" -WorkingDirectory \"{testFolder}/projects\" -VsVersion {os} -compiler MsBuild"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion regression_test.py
Expand Up @@ -150,7 +150,7 @@ def launch_tests():
Test("HelloLinux", "HelloLinux.Main.sharpmake.cs"),
Test("HelloAssembly", "HelloAssembly.sharpmake.cs"),
Test("CSharpVsix", "CSharpVsix.sharpmake.cs"),
Test("CSharpWCF", "CSharpWCF.sharpmake.cs", project_root="codebase"),
Test("CSharpWCF", "CSharpWCF.sharpmake.cs"),
Test("CSharpImports", "CSharpImports.sharpmake.cs"),
Test("PackageReferences", "PackageReferences.sharpmake.cs"),
#Test("QTFileCustomBuild", "QTFileCustomBuild.sharpmake.cs"), # commented out since output has discrepancies between net472 and net5.0
Expand Down
6 changes: 3 additions & 3 deletions samples/CSharpWCF/CSharpWCF.sharpmake.cs
Expand Up @@ -13,7 +13,7 @@ public class CSharpWCFProject : CSharpProject
public CSharpWCFProject()
{
SourceRootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
RootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
RootPath = @"[project.SharpmakeCsPath]\projects\[project.Name]";

ProjectTypeGuids = CSharpProjectType.Default;

Expand Down Expand Up @@ -61,7 +61,7 @@ public class CSharpWCFAppProject : CSharpProject
public CSharpWCFAppProject()
{
SourceRootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
RootPath = @"[project.SharpmakeCsPath]\codebase\[project.Name]";
RootPath = @"[project.SharpmakeCsPath]\projects\[project.Name]";

SourceFilesExcludeRegex.Add(@".*\.vs\.*");

Expand Down Expand Up @@ -136,7 +136,7 @@ public void ConfigureAll(Configuration conf, Target target)
Name,
"[target.DevEnv]",
"[target.Framework]");
conf.SolutionPath = @"[solution.SharpmakeCsPath]\codebase\";
conf.SolutionPath = @"[solution.SharpmakeCsPath]\projects\";

conf.AddProject<CSharpWCFProject>(target);
conf.AddProject<CSharpWCFAppProject>(target);
Expand Down
@@ -1,8 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpWCF", "CSharpWCF\CSharpWCF.vs2015.v4_5_2.csproj", "{3D46B916-6806-3778-DB08-02BDDE768A39}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpWCF", "csharpwcf\CSharpWCF.vs2015.v4_5_2.csproj", "{3D46B916-6806-3778-DB08-02BDDE768A39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpWCFApp", "CSharpWCFApp\CSharpWCFApp.vs2015.v4_5_2.csproj", "{742456DD-70C9-26F7-F5DE-98386A8E8919}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpWCFApp", "csharpwcfapp\CSharpWCFApp.vs2015.v4_5_2.csproj", "{742456DD-70C9-26F7-F5DE-98386A8E8919}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Expand Up @@ -70,31 +70,55 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service References\ServiceReference\Reference.cs">
<Compile Include="..\..\codebase\CSharpWCF\Class1.cs">
<Link>Class1.cs</Link>
</Compile>
<Compile Include="..\..\codebase\CSharpWCF\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
<Link>Service References\ServiceReference\Reference.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Service References\ServiceReference\CSharpWCF.ServiceReference.CompositeType.datasource" />
<None Include="Service References\ServiceReference\Reference.svcmap">
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\CSharpWCF.ServiceReference.CompositeType.datasource">
<Link>Resources\CSharpWCF.ServiceReference.CompositeType.datasource</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
<Link>Service References\ServiceReference\Reference.svcmap</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Service1.disco">
<Link>Resources\Service1.disco</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Service1.wsdl">
<Link>Resources\Service1.wsdl</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Service1.xsd">
<Link>Resources\Service1.xsd</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Service11.xsd">
<Link>Resources\Service11.xsd</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\Service12.xsd">
<Link>Resources\Service12.xsd</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\configuration.svcinfo">
<Link>Resources\configuration.svcinfo</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\Service References\ServiceReference\configuration91.svcinfo">
<Link>Resources\configuration91.svcinfo</Link>
</None>
<None Include="..\..\codebase\CSharpWCF\app.config">
<Link>Resources\app.config</Link>
</None>
<None Include="Service References\ServiceReference\Service1.disco" />
<None Include="Service References\ServiceReference\Service1.wsdl" />
<None Include="Service References\ServiceReference\Service1.xsd" />
<None Include="Service References\ServiceReference\Service11.xsd" />
<None Include="Service References\ServiceReference\Service12.xsd" />
<None Include="Service References\ServiceReference\configuration.svcinfo" />
<None Include="Service References\ServiceReference\configuration91.svcinfo" />
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Service References\ServiceReference" />
<WCFMetadataStorage Include="..\..\codebase\CSharpWCF\Service References\ServiceReference" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
Expand Up @@ -100,14 +100,26 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="IService1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service1.svc.cs" />
<Compile Include="..\..\codebase\CSharpWCFApp\IService1.cs">
<Link>IService1.cs</Link>
</Compile>
<Compile Include="..\..\codebase\CSharpWCFApp\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\..\codebase\CSharpWCFApp\Service1.svc.cs">
<Link>Service1.svc.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Web.Debug.config" />
<None Include="Web.Release.config" />
<None Include="Web.config" />
<None Include="..\..\codebase\CSharpWCFApp\Web.Debug.config">
<Link>Resources\Web.Debug.config</Link>
</None>
<None Include="..\..\codebase\CSharpWCFApp\Web.Release.config">
<Link>Resources\Web.Release.config</Link>
</None>
<None Include="..\..\codebase\CSharpWCFApp\Web.config">
<Link>Resources\Web.config</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit 683e8b3

Please sign in to comment.