Skip to content

Commit

Permalink
Merge pull request dotnet#3661 from StephenBonikowsky/stebon/master/b…
Browse files Browse the repository at this point in the history
…uildsvcutilcore

Build and package dotnet-svcutil tool.
  • Loading branch information
StephenBonikowsky authored Jun 12, 2019
2 parents d58487a + 5f4af48 commit ec33be5
Show file tree
Hide file tree
Showing 20 changed files with 171 additions and 195 deletions.
12 changes: 12 additions & 0 deletions System.ServiceModel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "harvest", "src\harvest\harv
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests", "src\System.Private.ServiceModel\tests\Scenarios\Binding\WS\TransportWithMessageCredentialSecurity\Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests.csproj", "{161C03B5-B606-4DC2-BC10-5935D1DADDD5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-svcutil.xmlserializer", "src\svcutilcore\src\dotnet-svcutil.xmlserializer.csproj", "{EAB2959D-0A16-4F60-A453-765491E1C069}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-svcutil.xmlserializer.Tests", "src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj", "{AECCDD96-7C28-4302-9F34-C9ADEE21C7E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -237,6 +241,14 @@ Global
{161C03B5-B606-4DC2-BC10-5935D1DADDD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{161C03B5-B606-4DC2-BC10-5935D1DADDD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{161C03B5-B606-4DC2-BC10-5935D1DADDD5}.Release|Any CPU.Build.0 = Release|Any CPU
{EAB2959D-0A16-4F60-A453-765491E1C069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAB2959D-0A16-4F60-A453-765491E1C069}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAB2959D-0A16-4F60-A453-765491E1C069}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAB2959D-0A16-4F60-A453-765491E1C069}.Release|Any CPU.Build.0 = Release|Any CPU
{AECCDD96-7C28-4302-9F34-C9ADEE21C7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AECCDD96-7C28-4302-9F34-C9ADEE21C7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AECCDD96-7C28-4302-9F34-C9ADEE21C7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AECCDD96-7C28-4302-9F34-C9ADEE21C7E6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 3 additions & 1 deletion eng/TestProperties.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<Project>
<PropertyGroup>
<WcfPrivateServiceModelProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\System.Private.ServiceModel\src\System.Private.ServiceModel.csproj'))</WcfPrivateServiceModelProj>
<WcfRootFolder>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..'))</WcfRootFolder>
<WcfPrivateServiceModelProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.Private.ServiceModel\src\System.Private.ServiceModel.csproj'))</WcfPrivateServiceModelProj>

<WcfDuplexRefProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.ServiceModel.Duplex\ref\System.ServiceModel.Duplex.Ref.csproj'))</WcfDuplexRefProj>
<WcfHttpRefProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.ServiceModel.Http\ref\System.ServiceModel.Http.Ref.csproj'))</WcfHttpRefProj>
<WcfPrimitivesRefProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.ServiceModel.Primitives\ref\System.ServiceModel.Primitives.Ref.csproj'))</WcfPrimitivesRefProj>
<WcfNetTcpRefProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.ServiceModel.NetTcp\ref\System.ServiceModel.NetTcp.Ref.csproj'))</WcfNetTcpRefProj>
<WcfSecurityRefProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.ServiceModel.Security\ref\System.ServiceModel.Security.Ref.csproj'))</WcfSecurityRefProj>
<SvcUtilCoreProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\svcutilcore\src\dotnet-svcutil.xmlserializer.csproj'))</SvcUtilCoreProj>

<WcfUnitTestCommonProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.Private.ServiceModel\tests\Common\Unit\UnitTests.Common.csproj'))</WcfUnitTestCommonProj>
<WcfScenarioTestCommonProj>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.Private.ServiceModel\tests\Common\Scenarios\ScenarioTests.Common.Tests.csproj'))</WcfScenarioTestCommonProj>
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Security\tests\System.ServiceModel.Security.Tests.csproj;

- _xUnitScenarioTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Custom\Binding.Custom.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\Binding.Http.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Tcp\Binding.Tcp.IntegrationTests.csproj;
Expand All @@ -115,6 +116,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Security\TransportSecurity\Security.TransportSecurity.IntegrationTests.csproj;

- _xUnitAllTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Duplex\tests\System.ServiceModel.Duplex.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Http\tests\System.ServiceModel.Http.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.NetTcp\tests\System.ServiceModel.NetTcp.Tests.csproj;
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Security\tests\System.ServiceModel.Security.Tests.csproj;

- _xUnitScenarioTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Custom\Binding.Custom.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\Binding.Http.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Tcp\Binding.Tcp.IntegrationTests.csproj;
Expand All @@ -111,6 +112,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Security\TransportSecurity\Security.TransportSecurity.IntegrationTests.csproj;

- _xUnitAllTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Duplex\tests\System.ServiceModel.Duplex.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Http\tests\System.ServiceModel.Http.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.NetTcp\tests\System.ServiceModel.NetTcp.Tests.csproj;
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Security\tests\System.ServiceModel.Security.Tests.csproj;

- _xUnitScenarioTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Custom\Binding.Custom.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\Binding.Http.IntegrationTests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Binding\Tcp\Binding.Tcp.IntegrationTests.csproj;
Expand All @@ -124,6 +125,7 @@ jobs:
$(BUILD.SOURCESDIRECTORY)\src\System.Private.ServiceModel\tests\Scenarios\Security\TransportSecurity\Security.TransportSecurity.IntegrationTests.csproj;

- _xUnitAllTestProjects:
$(BUILD.SOURCESDIRECTORY)\src\svcutilcore\tests\dotnet-svcutil.xmlserializer.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Duplex\tests\System.ServiceModel.Duplex.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.Http\tests\System.ServiceModel.Http.Tests.csproj;
$(BUILD.SOURCESDIRECTORY)\src\System.ServiceModel.NetTcp\tests\System.ServiceModel.NetTcp.Tests.csproj;
Expand Down
12 changes: 10 additions & 2 deletions release-notes/dotnet-svcutil.xmlserializer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
Visit [GitHub issue#2927](https://github.com/dotnet/wcf/issues/2927) for Getting Started instructions and for design and other discussions.

### Information
* [NuGet Package](https://nuget.org/packages/dotnet-svcutil.xmlserializer)
* [NuGet Packages](https://nuget.org/packages/dotnet-svcutil.xmlserializer)
* [Report an Issue](https://github.com/dotnet/wcf/issues/new)
* [Source](https://github.com/dotnet/wcf/tree/master/src/svcutilcore)

## Version History

### 1.1.0
* [NuGet Package] - add link as soon as published on NuGet

### 1.0.0
* [NuGet Package](https://www.nuget.org/packages/dotnet-svcutil.xmlserializer/1.0.0)

### 1.0.0-preview1
* Initial release
* [NuGet Package](https://www.nuget.org/packages/dotnet-svcutil.xmlserializer/1.0.0-preview1)
14 changes: 0 additions & 14 deletions src/svcutilcore/dir.props

This file was deleted.

30 changes: 30 additions & 0 deletions src/svcutilcore/files/GenerateNupkgProps.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<PropsFileName>$(AssemblyName).props</PropsFileName>
</PropertyGroup>

<ItemGroup>
<None Include="$(IntermediateOutputPath)\$(PropsFileName)" Pack="true" PackagePath="build/" />
</ItemGroup>

<!--Just need to make sure this file is generated and bin dropped before Pack starts.-->
<!--Setting Pack as the BeforeTargets was not soon enough for the file to get generated before it was being looked for.-->
<Target Name="GenerateNupkgProps" BeforeTargets="Build">
<PropertyGroup>
<PropsFileContents>
&lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
&lt;ItemGroup&gt;
&lt;DotNetCliToolReference Include="$(AssemblyName)" Version="$(PackageVersion)" /&gt;
&lt;/ItemGroup&gt;
&lt;/Project&gt;
</PropsFileContents>
</PropertyGroup>
<WriteLinesToFile
File="$(IntermediateOutputPath)\$(PropsFileName)"
Lines="$(PropsFileContents)"
Overwrite="true" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Delete Condition="Exists('$(_SerializerPdbIntermediateFolder)') == 'true'" Files="$(_SerializerPdbIntermediateFolder)" ContinueOnError="true" />
<Delete Condition="Exists('$(_SerializerCsIntermediateFolder)') == 'true'" Files="$(_SerializerCsIntermediateFolder)" ContinueOnError="true" />
<Message Text="Running SvcUtil Serialization Tool" Importance="normal" />
<Exec Command="dotnet svcutil.xmlserializer $(IntermediateOutputPath)$(AssemblyName)$(TargetExt) /out:$(IntermediateOutputPath)$(_SerializationAssemblyName) /smreference:&quot;@(_ReferenceSMAssembly)&quot;" ContinueOnError="true" />
<Exec Command="dotnet svcutil.xmlserializer $(IntermediateOutputPath)$(AssemblyName)$(TargetExt) --quiet --out:$(IntermediateOutputPath)$(_SerializationAssemblyName) --smreference:&quot;@(_ReferenceSMAssembly)&quot;" ContinueOnError="true" />
<Warning Condition="Exists('$(_SerializerCsIntermediateFolder)') != 'true'" Text="$(_SvcUtilWarningText)" />
<Csc Condition="Exists('$(_SerializerCsIntermediateFolder)') == 'true'" ContinueOnError="true" OutputAssembly="$(_SerializerDllIntermediateFolder)" References="@(ReferencePath);@(IntermediateAssembly)" EmitDebugInformation="$(DebugSymbols)" Sources="$(_SerializerCsIntermediateFolder)" TargetType="Library" ToolExe="$(CscToolExe)" ToolPath="$(CscToolPath)" DisabledWarnings="$(_SerializationAssemblyDisabledWarnings)" />
<Warning Condition="Exists('$(_SerializerDllIntermediateFolder)') != 'true' And Exists('$(_SerializerCsIntermediateFolder)') == 'true'" Text="$(_SvcUtilWarningText)" />
Expand Down
File renamed without changes.
32 changes: 0 additions & 32 deletions src/svcutilcore/pkg/GenerateNupkgProps.targets

This file was deleted.

35 changes: 0 additions & 35 deletions src/svcutilcore/pkg/dotnet-svcutil.xmlserializer.pkgproj

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/svcutilcore/src/Configurations.props

This file was deleted.

13 changes: 7 additions & 6 deletions src/svcutilcore/src/GenerateThisAssemblyCs.targets
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--<PropertyGroup>
<CompileDependsOn>
GenerateThisAssemblyCs;
$(CompileDependsOn)
$(CompileDependsOn);
GenerateThisAssemblyCs
</CompileDependsOn>
</PropertyGroup>
</PropertyGroup>-->
<ItemGroup>
<Compile Include="$(IntermediateOutputPath)\ThisAssembly.cs"/>
</ItemGroup>

<Target Name="GenerateThisAssemblyCs">
<Target Name="GenerateThisAssemblyCs" BeforeTargets="BeforeCompile">
<PropertyGroup>
<ThisAssemblyCsContents>
using System%3B
Expand Down Expand Up @@ -49,9 +49,10 @@ namespace Microsoft.Tools.ServiceModel.SvcUtil.XmlSerializer

<!-- Write ThisAssembly.cs if this is a new version number, or it is missing -->
<WriteLinesToFile
File="$(IntermediateOutputPath)\ThisAssembly.cs"
File="$(IntermediateOutputPath)ThisAssembly.cs"
Lines="$(ThisAssemblyCsContents)"
Overwrite="true"
Encoding="Unicode"/>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,10 @@ private void LoadSMReferenceAssembly()
if (referencedAssembliesArgs != null && referencedAssembliesArgs.Count > 0)
{
string smassembly = referencedAssembliesArgs[0];
if(smassembly.LastIndexOf("System.ServiceModel.Primitives") == -1)
// Allow the reference to be for System.Private.ServiceModel as well.
if((smassembly.LastIndexOf("System.ServiceModel.Primitives", StringComparison.OrdinalIgnoreCase) == -1) && (smassembly.LastIndexOf("System.Private.ServiceModel", StringComparison.OrdinalIgnoreCase) == -1))
{
ToolConsole.WriteError("Need pass the right path of System.ServiceModel.Primitives for smreference parameter");
ToolConsole.WriteError("Need to pass the right path of System.ServiceModel.Primitives for smreference parameter");
throw new ArgumentException("Invalid smreference value");
}

Expand Down
Loading

0 comments on commit ec33be5

Please sign in to comment.