diff --git a/CMakeLists.txt b/CMakeLists.txt index a29029928..07ea01df3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,9 @@ else() endif() +# Generate .NET Version file. +configure_file(VersionInfo.cs.in ${CMAKE_CURRENT_SOURCE_DIR}/src/csharp/VersionInfo.cs) + set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}) # CMake doesn't set the target processor correctly for MSVC diff --git a/src/csharp/VersionInfo.cs b/VersionInfo.cs.in similarity index 63% rename from src/csharp/VersionInfo.cs rename to VersionInfo.cs.in index 735873732..66b210620 100644 --- a/src/csharp/VersionInfo.cs +++ b/VersionInfo.cs.in @@ -10,13 +10,20 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif + +[assembly: AssemblyProduct("@K4A_PRODUCTNAME@")] +[assembly: AssemblyCompany("@K4A_COMPANYNAME@")] [assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: CLSCompliant(true)] // This is the shared assembly version file for all of our assemblies. -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("@K4A_VERSION_MAJOR@.@K4A_VERSION_MINOR@.@K4A_VERSION_PATCH@.0")] +[assembly: AssemblyFileVersion("@VERSION_STR@.@K4A_VERSION_REVISION@")] +[assembly: AssemblyInformationalVersion("@VERSION_STR@.@K4A_VERSION_REVISION@")] diff --git a/src/csharp/.gitignore b/src/csharp/.gitignore index b70bba617..9e6f77849 100644 --- a/src/csharp/.gitignore +++ b/src/csharp/.gitignore @@ -1,9 +1,9 @@ ## Ignore CMake generated files that enable the CSharp solution to find and interact with the CMake built files. /k4a.*.props - -/StubGenerator.*.json /StubGenerator.*.xml +/VersionInfo.cs + ## Ignore the generated documentation file /SDK/Microsoft.Azure.Kinect.Sensor.xml diff --git a/src/csharp/Examples/WPF/Properties/AssemblyInfo.cs b/src/csharp/Examples/WPF/Properties/AssemblyInfo.cs index e00ac8d98..dbe867d4c 100644 --- a/src/csharp/Examples/WPF/Properties/AssemblyInfo.cs +++ b/src/csharp/Examples/WPF/Properties/AssemblyInfo.cs @@ -13,7 +13,6 @@ // associated with an assembly. [assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.Examples.WPFViewer")] [assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Microsoft.Azure.Kinect.Sensor.Examples.WPFViewer")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/csharp/Examples/WinForms/Properties/AssemblyInfo.cs b/src/csharp/Examples/WinForms/Properties/AssemblyInfo.cs index c898a8f7a..75bc62f24 100644 --- a/src/csharp/Examples/WinForms/Properties/AssemblyInfo.cs +++ b/src/csharp/Examples/WinForms/Properties/AssemblyInfo.cs @@ -13,7 +13,6 @@ // associated with an assembly. [assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.Examples.WinForms")] [assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Microsoft.Azure.Kinect.Sensor.Examples.WinForms")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/csharp/Extensions/WPF/Properties/AssemblyInfo.cs b/src/csharp/Extensions/WPF/Properties/AssemblyInfo.cs index 3dbb9dc4d..f58619fb3 100644 --- a/src/csharp/Extensions/WPF/Properties/AssemblyInfo.cs +++ b/src/csharp/Extensions/WPF/Properties/AssemblyInfo.cs @@ -13,7 +13,6 @@ // associated with an assembly. [assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.WPF")] [assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Microsoft.Azure.Kinect.Sensor.WPF")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/csharp/Extensions/WinForms/Properties/AssemblyInfo.cs b/src/csharp/Extensions/WinForms/Properties/AssemblyInfo.cs index d0ee4d336..1a8446ffa 100644 --- a/src/csharp/Extensions/WinForms/Properties/AssemblyInfo.cs +++ b/src/csharp/Extensions/WinForms/Properties/AssemblyInfo.cs @@ -13,7 +13,6 @@ // associated with an assembly. [assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.WinForms")] [assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Microsoft.Azure.Kinect.Sensor.WinForms")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/csharp/K4a.sln b/src/csharp/K4a.sln index 57d05cde5..a2cb9c758 100644 --- a/src/csharp/K4a.sln +++ b/src/csharp/K4a.sln @@ -28,7 +28,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{118BF8E1-C662-4852-955F-22DC68BB95CC}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .gitignore = .gitignore AzureKinectSensorSDK.ruleset = AzureKinectSensorSDK.ruleset + k4a.props = k4a.props Microsoft.Azure.Kinect.Sensor.snk = Microsoft.Azure.Kinect.Sensor.snk stylecop.json = stylecop.json VersionInfo.cs = VersionInfo.cs diff --git a/src/csharp/SDK/Microsoft.Azure.Kinect.Sensor.csproj b/src/csharp/SDK/Microsoft.Azure.Kinect.Sensor.csproj index ca330a6c4..08ffd4664 100644 --- a/src/csharp/SDK/Microsoft.Azure.Kinect.Sensor.csproj +++ b/src/csharp/SDK/Microsoft.Azure.Kinect.Sensor.csproj @@ -13,12 +13,6 @@ true $(OutputPath)Microsoft.Azure.Kinect.Sensor.xml - Microsoft Azure Kinect Sensor SDK - Microsoft - Copyright (c) Microsoft Corporation. All rights reserved. - Licensed under the MIT License. - 1.0.0.0 - 1.0.0.0 true ..\Microsoft.Azure.Kinect.Sensor.snk @@ -28,6 +22,10 @@ stylecop.json + + + + diff --git a/src/csharp/SDK/Properties/AssemblyInfo.cs b/src/csharp/SDK/Properties/AssemblyInfo.cs index 43ece9353..ae03e5390 100644 --- a/src/csharp/SDK/Properties/AssemblyInfo.cs +++ b/src/csharp/SDK/Properties/AssemblyInfo.cs @@ -4,6 +4,20 @@ // Licensed under the MIT License. // //------------------------------------------------------------------------------ -using System; +using System.Reflection; +using System.Runtime.InteropServices; -[assembly: CLSCompliant(true)] +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("28E47B37-B205-4353-92B1-1345C47CD710")] diff --git a/src/csharp/Tests/FunctionalTests/Microsoft.Azure.Kinect.Sensor.FunctionalTests.csproj b/src/csharp/Tests/FunctionalTests/Microsoft.Azure.Kinect.Sensor.FunctionalTests.csproj index 8675edb00..c6995dca8 100644 --- a/src/csharp/Tests/FunctionalTests/Microsoft.Azure.Kinect.Sensor.FunctionalTests.csproj +++ b/src/csharp/Tests/FunctionalTests/Microsoft.Azure.Kinect.Sensor.FunctionalTests.csproj @@ -27,6 +27,10 @@ + + + + all diff --git a/src/csharp/Tests/FunctionalTests/Properties/AssemblyInfo.cs b/src/csharp/Tests/FunctionalTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0e7610783 --- /dev/null +++ b/src/csharp/Tests/FunctionalTests/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +//------------------------------------------------------------------------------ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.FunctionalTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ebf80b3b-83a1-4369-954b-922d8ee5e9cc")] diff --git a/src/csharp/Tests/StubGenerator.UnitTests/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.UnitTests.csproj b/src/csharp/Tests/StubGenerator.UnitTests/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.UnitTests.csproj index 4a0de861a..2a3cf43ae 100644 --- a/src/csharp/Tests/StubGenerator.UnitTests/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.UnitTests.csproj +++ b/src/csharp/Tests/StubGenerator.UnitTests/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.UnitTests.csproj @@ -53,6 +53,10 @@ + + + + all diff --git a/src/csharp/Tests/StubGenerator.UnitTests/Properties/AssemblyInfo.cs b/src/csharp/Tests/StubGenerator.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..f13266b36 --- /dev/null +++ b/src/csharp/Tests/StubGenerator.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +//------------------------------------------------------------------------------ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("151f9524-9cf0-419d-81b7-cf2d52f90ee5")] diff --git a/src/csharp/Tests/StubGenerator/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.csproj b/src/csharp/Tests/StubGenerator/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.csproj index 1cab1156b..9713d04e8 100644 --- a/src/csharp/Tests/StubGenerator/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.csproj +++ b/src/csharp/Tests/StubGenerator/Microsoft.Azure.Kinect.Sensor.Test.StubGenerator.csproj @@ -29,6 +29,10 @@ + + + + all diff --git a/src/csharp/Tests/StubGenerator/Properties/AssemblyInfo.cs b/src/csharp/Tests/StubGenerator/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9a63c7770 --- /dev/null +++ b/src/csharp/Tests/StubGenerator/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +//------------------------------------------------------------------------------ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.Test.StubGenerator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("44795fa0-9b17-40fb-8c8b-f77d754970c8")] diff --git a/src/csharp/Tests/UnitTests/Microsoft.Azure.Kinect.Sensor.UnitTests.csproj b/src/csharp/Tests/UnitTests/Microsoft.Azure.Kinect.Sensor.UnitTests.csproj index be18e7e83..438ca44ef 100644 --- a/src/csharp/Tests/UnitTests/Microsoft.Azure.Kinect.Sensor.UnitTests.csproj +++ b/src/csharp/Tests/UnitTests/Microsoft.Azure.Kinect.Sensor.UnitTests.csproj @@ -53,6 +53,10 @@ + + + + all diff --git a/src/csharp/Tests/UnitTests/Properties/AssemblyInfo.cs b/src/csharp/Tests/UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..be0b26715 --- /dev/null +++ b/src/csharp/Tests/UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +//------------------------------------------------------------------------------ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Kinect.Sensor.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9a8ec674-aad4-486b-b747-d53989bc8f89")] diff --git a/src/csharp/k4a.props b/src/csharp/k4a.props index a23ddb055..fe87442fc 100644 --- a/src/csharp/k4a.props +++ b/src/csharp/k4a.props @@ -13,10 +13,15 @@ $(K4aBinaryDirectory)\obj\ $(BaseIntermediateOutputPath)\$(Configuration)\$(Platform)\$(AssemblyName)\--> - + + This will also happen if the platform is AnyCPU and the output path wasn't included. --> $(MSBuildThisFileDirectory)\Build\$(Configuration)\$(Platform)\ + + + + false + \ No newline at end of file