From 65763788a2a9a2164ba5ca90157e0d2236f2aea1 Mon Sep 17 00:00:00 2001 From: Johan Laanstra Date: Tue, 6 Feb 2018 16:55:23 -0800 Subject: [PATCH] Invoke SimpleStubs as an exe and don't run for design-time builds. --- SimpleStubs.sln | 245 +++++------ Targets/Etg.SimpleStubs.targets | 29 +- .../DebuggingConsoleApp.csproj | 172 -------- src/DebuggingConsoleApp/Program.cs | 18 - .../Properties/AssemblyInfo.cs | 36 -- src/DebuggingConsoleApp/packages.config | 54 --- src/SimpleStubs.CodeGen/CommandLineParser.cs | 38 ++ src/SimpleStubs.CodeGen/Program.cs | 45 ++ .../SimpleStubs.CodeGen.csproj | 337 +++++++++------ .../Tasks/GenerateStubsTask.cs | 51 --- .../app.config} | 89 ++-- src/SimpleStubs.CodeGen/packages.config | 93 ++-- .../Etg.SimpleStubs.targets | 29 +- .../TestClassLibraryTest.csproj | 397 ++++++++++-------- test/TestClassLibraryTest/app.config | 39 ++ test/TestClassLibraryTest/packages.config | 85 ++-- 16 files changed, 866 insertions(+), 891 deletions(-) delete mode 100644 src/DebuggingConsoleApp/DebuggingConsoleApp.csproj delete mode 100644 src/DebuggingConsoleApp/Program.cs delete mode 100644 src/DebuggingConsoleApp/Properties/AssemblyInfo.cs delete mode 100644 src/DebuggingConsoleApp/packages.config create mode 100644 src/SimpleStubs.CodeGen/CommandLineParser.cs create mode 100644 src/SimpleStubs.CodeGen/Program.cs delete mode 100644 src/SimpleStubs.CodeGen/Tasks/GenerateStubsTask.cs rename src/{DebuggingConsoleApp/App.config => SimpleStubs.CodeGen/app.config} (77%) create mode 100644 test/TestClassLibraryTest/app.config diff --git a/SimpleStubs.sln b/SimpleStubs.sln index e4405d1..0984e5b 100644 --- a/SimpleStubs.sln +++ b/SimpleStubs.sln @@ -1,130 +1,115 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26430.13 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleStubs.CodeGen", "src\SimpleStubs.CodeGen\SimpleStubs.CodeGen.csproj", "{3E9C520A-94CF-46D0-864B-4293D439C92A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClassLibrary", "test\TestClassLibrary\TestClassLibrary.csproj", "{ECBCBAE6-949E-4E9C-84E1-614D97909B6C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClassLibraryTest", "test\TestClassLibraryTest\TestClassLibraryTest.csproj", "{CB81F60F-1374-4B46-BB64-D848B5103A58}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleStubs.Test", "SimpleStubs.Test\SimpleStubs.Test.csproj", "{42D8B4EF-C779-4966-AF96-46F51E15C88E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleStubs", "src\SimpleStubs\SimpleStubs.csproj", "{56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebuggingConsoleApp", "src\DebuggingConsoleApp\DebuggingConsoleApp.csproj", "{F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|ARM.Build.0 = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x64.ActiveCfg = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x64.Build.0 = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x86.ActiveCfg = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x86.Build.0 = Debug|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|Any CPU.Build.0 = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|ARM.ActiveCfg = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|ARM.Build.0 = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x64.ActiveCfg = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x64.Build.0 = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x86.ActiveCfg = Release|Any CPU - {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x86.Build.0 = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|ARM.Build.0 = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x64.ActiveCfg = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x64.Build.0 = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x86.ActiveCfg = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x86.Build.0 = Debug|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|ARM.ActiveCfg = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|ARM.Build.0 = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x64.ActiveCfg = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x64.Build.0 = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x86.ActiveCfg = Release|Any CPU - {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x86.Build.0 = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|ARM.ActiveCfg = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|ARM.Build.0 = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x64.ActiveCfg = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x64.Build.0 = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x86.ActiveCfg = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x86.Build.0 = Debug|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|Any CPU.Build.0 = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|ARM.ActiveCfg = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|ARM.Build.0 = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x64.ActiveCfg = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x64.Build.0 = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x86.ActiveCfg = Release|Any CPU - {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x86.Build.0 = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|ARM.ActiveCfg = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|ARM.Build.0 = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x64.ActiveCfg = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x64.Build.0 = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x86.ActiveCfg = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x86.Build.0 = Debug|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|Any CPU.Build.0 = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|ARM.ActiveCfg = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|ARM.Build.0 = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x64.ActiveCfg = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x64.Build.0 = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x86.ActiveCfg = Release|Any CPU - {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x86.Build.0 = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|ARM.ActiveCfg = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|ARM.Build.0 = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x64.ActiveCfg = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x64.Build.0 = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x86.ActiveCfg = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x86.Build.0 = Debug|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|Any CPU.Build.0 = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|ARM.ActiveCfg = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|ARM.Build.0 = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x64.ActiveCfg = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x64.Build.0 = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x86.ActiveCfg = Release|Any CPU - {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x86.Build.0 = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|ARM.Build.0 = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|x64.ActiveCfg = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|x64.Build.0 = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|x86.ActiveCfg = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Debug|x86.Build.0 = Debug|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|Any CPU.Build.0 = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|ARM.ActiveCfg = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|ARM.Build.0 = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|x64.ActiveCfg = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|x64.Build.0 = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|x86.ActiveCfg = Release|Any CPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleStubs.CodeGen", "src\SimpleStubs.CodeGen\SimpleStubs.CodeGen.csproj", "{3E9C520A-94CF-46D0-864B-4293D439C92A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClassLibrary", "test\TestClassLibrary\TestClassLibrary.csproj", "{ECBCBAE6-949E-4E9C-84E1-614D97909B6C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClassLibraryTest", "test\TestClassLibraryTest\TestClassLibraryTest.csproj", "{CB81F60F-1374-4B46-BB64-D848B5103A58}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleStubs.Test", "SimpleStubs.Test\SimpleStubs.Test.csproj", "{42D8B4EF-C779-4966-AF96-46F51E15C88E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleStubs", "src\SimpleStubs\SimpleStubs.csproj", "{56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|ARM.ActiveCfg = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|ARM.Build.0 = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x64.ActiveCfg = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x64.Build.0 = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x86.ActiveCfg = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Debug|x86.Build.0 = Debug|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|Any CPU.Build.0 = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|ARM.ActiveCfg = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|ARM.Build.0 = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x64.ActiveCfg = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x64.Build.0 = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x86.ActiveCfg = Release|Any CPU + {3E9C520A-94CF-46D0-864B-4293D439C92A}.Release|x86.Build.0 = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|ARM.Build.0 = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x64.ActiveCfg = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x64.Build.0 = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x86.ActiveCfg = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Debug|x86.Build.0 = Debug|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|Any CPU.Build.0 = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|ARM.ActiveCfg = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|ARM.Build.0 = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x64.ActiveCfg = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x64.Build.0 = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x86.ActiveCfg = Release|Any CPU + {ECBCBAE6-949E-4E9C-84E1-614D97909B6C}.Release|x86.Build.0 = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|ARM.ActiveCfg = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|ARM.Build.0 = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x64.ActiveCfg = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x64.Build.0 = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x86.ActiveCfg = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Debug|x86.Build.0 = Debug|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|Any CPU.Build.0 = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|ARM.ActiveCfg = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|ARM.Build.0 = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x64.ActiveCfg = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x64.Build.0 = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x86.ActiveCfg = Release|Any CPU + {CB81F60F-1374-4B46-BB64-D848B5103A58}.Release|x86.Build.0 = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|ARM.ActiveCfg = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|ARM.Build.0 = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x64.ActiveCfg = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x64.Build.0 = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x86.ActiveCfg = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Debug|x86.Build.0 = Debug|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|Any CPU.Build.0 = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|ARM.ActiveCfg = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|ARM.Build.0 = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x64.ActiveCfg = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x64.Build.0 = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x86.ActiveCfg = Release|Any CPU + {42D8B4EF-C779-4966-AF96-46F51E15C88E}.Release|x86.Build.0 = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|ARM.ActiveCfg = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|ARM.Build.0 = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x64.ActiveCfg = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x64.Build.0 = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x86.ActiveCfg = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Debug|x86.Build.0 = Debug|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|Any CPU.Build.0 = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|ARM.ActiveCfg = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|ARM.Build.0 = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x64.ActiveCfg = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x64.Build.0 = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x86.ActiveCfg = Release|Any CPU + {56BE6AEF-6DB7-4FA6-89BB-B50C5DBBC675}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0D89DE17-FFB0-4221-A07B-5C19176CC099} + EndGlobalSection +EndGlobal diff --git a/Targets/Etg.SimpleStubs.targets b/Targets/Etg.SimpleStubs.targets index 42b579f..19fb12d 100644 --- a/Targets/Etg.SimpleStubs.targets +++ b/Targets/Etg.SimpleStubs.targets @@ -1,15 +1,26 @@ - - CoreCompile - ResolveReferences - $(IntermediateOutputPath)SimpleStubs.generated.cs + CoreCompile;XamlPreCompile + ResolveReferences + $(IntermediateOutputPath)SimpleStubs.generated.cs + true - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/DebuggingConsoleApp/DebuggingConsoleApp.csproj b/src/DebuggingConsoleApp/DebuggingConsoleApp.csproj deleted file mode 100644 index 9bc32bb..0000000 --- a/src/DebuggingConsoleApp/DebuggingConsoleApp.csproj +++ /dev/null @@ -1,172 +0,0 @@ - - - - - Debug - AnyCPU - {F5C20D8C-17DE-4E73-AF2A-BDED0D2E8138} - Exe - DebuggingConsoleApp - DebuggingConsoleApp - v4.6.1 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\ManagedEsent.1.9.4\lib\net40\Esent.Interop.dll - - - ..\..\packages\Microsoft.CodeAnalysis.Common.2.2.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.2.2.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.2.2.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - - - ..\..\packages\Microsoft.CodeAnalysis.Elfie.0.10.6\lib\net46\Microsoft.CodeAnalysis.Elfie.dll - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.2.0\lib\net46\Microsoft.CodeAnalysis.Workspaces.dll - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.2.0\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll - - - - ..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll - - - ..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - - - ..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll - - - - ..\..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll - - - ..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll - - - ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - - - ..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll - - - ..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - - - - ..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll - - - ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll - - - ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - - - ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - - - ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll - - - ..\..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll - - - ..\..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll - - - ..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll - - - - - - - - - ..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll - - - ..\..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll - - - ..\..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll - - - ..\..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll - - - - - - - - - - - - - - {ecbcbae6-949e-4e9c-84e1-614d97909b6c} - TestClassLibrary - - - {3e9c520a-94cf-46d0-864b-4293d439c92a} - SimpleStubs.CodeGen - - - {56be6aef-6db7-4fa6-89bb-b50c5dbbc675} - SimpleStubs - - - - - - - - \ No newline at end of file diff --git a/src/DebuggingConsoleApp/Program.cs b/src/DebuggingConsoleApp/Program.cs deleted file mode 100644 index 5affb4a..0000000 --- a/src/DebuggingConsoleApp/Program.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.IO; -using Etg.SimpleStubs.CodeGen; -using Etg.SimpleStubs.CodeGen.DI; - -namespace DebuggingConsoleApp -{ - class Program - { - static void Main(string[] args) - { - string path = @"..\..\DebuggingConsoleApp.csproj"; - SimpleStubsGenerator stubsGenerator = - new DiModule(path, @"..\..\Properties\SimpleStubs.generated.cs").StubsGenerator; - string stubs = stubsGenerator.GenerateStubs(path).Result; - File.WriteAllText(@"..\..\Properties\SimpleStubs.generated.cs", stubs); - } - } -} diff --git a/src/DebuggingConsoleApp/Properties/AssemblyInfo.cs b/src/DebuggingConsoleApp/Properties/AssemblyInfo.cs deleted file mode 100644 index 222bf60..0000000 --- a/src/DebuggingConsoleApp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -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("DebuggingConsoleApp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DebuggingConsoleApp")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[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("f5c20d8c-17de-4e73-af2a-bded0d2e8138")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/DebuggingConsoleApp/packages.config b/src/DebuggingConsoleApp/packages.config deleted file mode 100644 index 9713e42..0000000 --- a/src/DebuggingConsoleApp/packages.config +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/SimpleStubs.CodeGen/CommandLineParser.cs b/src/SimpleStubs.CodeGen/CommandLineParser.cs new file mode 100644 index 0000000..f24d4ba --- /dev/null +++ b/src/SimpleStubs.CodeGen/CommandLineParser.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Etg.SimpleStubs.CodeGen +{ + class CommandLineParser + { + public CommandLineParser() + { + Arguments = new Dictionary(); + } + + public IDictionary Arguments { get; private set; } + + public void Parse(string[] args) + { + foreach (var arg in args) + { + if (arg.StartsWith("-")) + { + var colon = arg.IndexOf(':'); + + if (colon != -1) + { + this.Arguments.Add(arg.Substring(0, colon), arg.Substring(colon + 1).Trim('\'', '\"')); + } + else + { + this.Arguments.Add(arg, string.Empty); + } + } + } + } + } +} diff --git a/src/SimpleStubs.CodeGen/Program.cs b/src/SimpleStubs.CodeGen/Program.cs new file mode 100644 index 0000000..0b4ea5e --- /dev/null +++ b/src/SimpleStubs.CodeGen/Program.cs @@ -0,0 +1,45 @@ +using System; +using System.IO; +using Etg.SimpleStubs.CodeGen; +using Etg.SimpleStubs.CodeGen.DI; + +namespace Etg.SimpleStubs.CodeGen +{ + class Program + { + static void Main(string[] args) + { + CommandLineParser parser = new CommandLineParser(); + parser.Parse(args); + + string projectPath = parser.Arguments["-ProjectPath"]; + if (string.IsNullOrEmpty(projectPath) || !File.Exists(projectPath)) + { + Console.WriteLine(DecorateMessage($"{projectPath} does not exist")); + return; + } + + string outputPath = parser.Arguments["-OutputPath"]; + if (string.IsNullOrEmpty(outputPath)) + { + Console.WriteLine(DecorateMessage($"{outputPath} cannot be empty")); + return; + } + + DiModule diModule = new DiModule(projectPath, outputPath); + Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); + + Console.WriteLine(DecorateMessage($"Generating stubs for project: {projectPath}")); + string stubsCode = diModule.StubsGenerator.GenerateStubs(projectPath).Result; + Console.WriteLine(DecorateMessage($"Writing stubs to file: {outputPath}")); + File.WriteAllText(outputPath, stubsCode); + + return; + } + + private static string DecorateMessage(string message) + { + return "SimpleStubs: " + message; + } + } +} diff --git a/src/SimpleStubs.CodeGen/SimpleStubs.CodeGen.csproj b/src/SimpleStubs.CodeGen/SimpleStubs.CodeGen.csproj index c165ebb..70f288c 100644 --- a/src/SimpleStubs.CodeGen/SimpleStubs.CodeGen.csproj +++ b/src/SimpleStubs.CodeGen/SimpleStubs.CodeGen.csproj @@ -1,142 +1,209 @@ - - - - - Debug - AnyCPU - {3E9C520A-94CF-46D0-864B-4293D439C92A} - Library - Properties - Etg.SimpleStubs.CodeGen - Etg.SimpleStubs.CodeGen - v4.6.1 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll - True - - - - - ..\..\packages\Microsoft.CodeAnalysis.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.1.1.1\lib\net45\Microsoft.CodeAnalysis.CSharp.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.1.1\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll - True - - - ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - True - - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - True - - - - ..\..\packages\System.Reflection.Metadata.1.1.0\lib\dotnet5.2\System.Reflection.Metadata.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - + + + + + Debug + AnyCPU + {3E9C520A-94CF-46D0-864B-4293D439C92A} + Exe + Properties + Etg.SimpleStubs.CodeGen + Etg.SimpleStubs.CodeGen + v4.6.1 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll + True + + + ..\..\packages\Microsoft.Build.15.5.180\lib\net46\Microsoft.Build.dll + True + + + ..\..\packages\Microsoft.Build.Framework.15.5.180\lib\net46\Microsoft.Build.Framework.dll + True + + + ..\..\packages\Microsoft.Build.Tasks.Core.15.5.180\lib\net46\Microsoft.Build.Tasks.Core.dll + True + + + ..\..\packages\Microsoft.Build.Utilities.Core.15.5.180\lib\net46\Microsoft.Build.Utilities.Core.dll + True + + + ..\..\packages\Microsoft.CodeAnalysis.Common.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.dll + + + ..\..\packages\Microsoft.CodeAnalysis.CSharp.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll + + + ..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Workspaces.dll + + + ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.6.1\lib\net46\Microsoft.CodeAnalysis.Workspaces.dll + + + ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.6.1\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll + + + ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + True + + + + ..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll + True + + + ..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + ..\..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll + + + ..\..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll + + + ..\..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll + + + ..\..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll + + + ..\..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll + + + ..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll + + + + ..\..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll + + + ..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll + + + ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + + + ..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll + + + ..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + + + + ..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll + + + ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + + + ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll + + + ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + + + ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + + + ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + + ..\..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll + + + ..\..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll + + + ..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + ..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + + + ..\..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll + + + ..\..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll + + + ..\..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + --> \ No newline at end of file diff --git a/src/SimpleStubs.CodeGen/Tasks/GenerateStubsTask.cs b/src/SimpleStubs.CodeGen/Tasks/GenerateStubsTask.cs deleted file mode 100644 index 743fce0..0000000 --- a/src/SimpleStubs.CodeGen/Tasks/GenerateStubsTask.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.Build.Framework; -using System; -using System.IO; -using Etg.SimpleStubs.CodeGen.DI; - -namespace Etg.SimpleStubs.CodeGen.Tasks -{ - /// - /// - public class GenerateStubsTask : Microsoft.Build.Utilities.AppDomainIsolatedTask - { - [Required] - public string OutputPath { get; set; } - - [Required] - public string ProjectPath { get; set; } - - public override bool Execute() - { - try - { - LogMessage("Generating stubs"); - DiModule diModule = new DiModule(ProjectPath, OutputPath); - Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); - File.WriteAllText(OutputPath, diModule.StubsGenerator.GenerateStubs(ProjectPath).Result); - return true; - } - catch (Exception e) - { - LogMessage(e.ToString()); - } - - return false; - } - - private void LogMessage(string message) - { - Log.LogMessage(MessageImportance.High, DecorateMessage(message)); - } - - private static string DecorateMessage(string message) - { - return "SimpleStubs: " + message; - } - - private void LogWarning(string message) - { - Log.LogWarning(DecorateMessage(message)); - } - } -} \ No newline at end of file diff --git a/src/DebuggingConsoleApp/App.config b/src/SimpleStubs.CodeGen/app.config similarity index 77% rename from src/DebuggingConsoleApp/App.config rename to src/SimpleStubs.CodeGen/app.config index 41e6298..3e15750 100644 --- a/src/DebuggingConsoleApp/App.config +++ b/src/SimpleStubs.CodeGen/app.config @@ -1,50 +1,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SimpleStubs.CodeGen/packages.config b/src/SimpleStubs.CodeGen/packages.config index a0844bc..231395e 100644 --- a/src/SimpleStubs.CodeGen/packages.config +++ b/src/SimpleStubs.CodeGen/packages.config @@ -1,29 +1,66 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/TestClassLibraryTest/Etg.SimpleStubs.targets b/test/TestClassLibraryTest/Etg.SimpleStubs.targets index 4c001be..2b9538e 100644 --- a/test/TestClassLibraryTest/Etg.SimpleStubs.targets +++ b/test/TestClassLibraryTest/Etg.SimpleStubs.targets @@ -1,10 +1,25 @@  - - - - - - - + + + CoreCompile;XamlPreCompile + ResolveReferences + $(IntermediateOutputPath)SimpleStubs.generated.cs + true + + + + + + + + + + + \ No newline at end of file diff --git a/test/TestClassLibraryTest/TestClassLibraryTest.csproj b/test/TestClassLibraryTest/TestClassLibraryTest.csproj index 169d7dd..92e69e0 100644 --- a/test/TestClassLibraryTest/TestClassLibraryTest.csproj +++ b/test/TestClassLibraryTest/TestClassLibraryTest.csproj @@ -1,175 +1,224 @@ - - - - Debug - AnyCPU - {CB81F60F-1374-4B46-BB64-D848B5103A58} - Library - Properties - TestClassLibraryTest - TestClassLibraryTest - v4.6.1 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - OnBuildSuccess - - - - ..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll - True - - - - ..\..\packages\Microsoft.CodeAnalysis.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.1.1.1\lib\net45\Microsoft.CodeAnalysis.CSharp.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.1.1\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll - True - - - ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll - True - - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - True - - - ..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - True - - - ..\..\packages\System.Reflection.Metadata.1.1.0\lib\dotnet5.2\System.Reflection.Metadata.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - - {3e9c520a-94cf-46d0-864b-4293d439c92a} - SimpleStubs.CodeGen - - - {56be6aef-6db7-4fa6-89bb-b50c5dbbc675} - SimpleStubs - - - {ecbcbae6-949e-4e9c-84e1-614d97909b6c} - TestClassLibrary - - - - - - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {CB81F60F-1374-4B46-BB64-D848B5103A58} + Library + Properties + TestClassLibraryTest + TestClassLibraryTest + v4.6.1 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + OnBuildSuccess + + + + ..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll + True + + + ..\..\packages\Microsoft.CodeAnalysis.Common.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.dll + + + ..\..\packages\Microsoft.CodeAnalysis.CSharp.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll + + + ..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Workspaces.dll + + + ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.6.1\lib\net46\Microsoft.CodeAnalysis.Workspaces.dll + + + ..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.6.1\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll + + + + ..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll + True + + + ..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + ..\..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll + + + ..\..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll + + + ..\..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll + + + ..\..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll + + + ..\..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll + + + ..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll + + + ..\..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll + + + ..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll + + + ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + + + ..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll + + + ..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + + + + ..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll + + + ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll + + + ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + + + ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + + + ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + + ..\..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll + + + ..\..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll + + + ..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll + + + + + ..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + + + ..\..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll + + + ..\..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll + + + ..\..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll + + + + + + + + + + + + + + + + + + + + + + + + + + {3e9c520a-94cf-46d0-864b-4293d439c92a} + SimpleStubs.CodeGen + + + {56be6aef-6db7-4fa6-89bb-b50c5dbbc675} + SimpleStubs + + + {ecbcbae6-949e-4e9c-84e1-614d97909b6c} + TestClassLibrary + + + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/TestClassLibraryTest/app.config b/test/TestClassLibraryTest/app.config new file mode 100644 index 0000000..3e15750 --- /dev/null +++ b/test/TestClassLibraryTest/app.config @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/TestClassLibraryTest/packages.config b/test/TestClassLibraryTest/packages.config index 0ccfd0b..92655ac 100644 --- a/test/TestClassLibraryTest/packages.config +++ b/test/TestClassLibraryTest/packages.config @@ -1,28 +1,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file