Selaa lähdekoodia

fist commit

master
Christophe Brachet 1 vuosi sitten
commit
bc83bb4b57
36 muutettua tiedostoa jossa 796 lisäystä ja 0 poistoa
  1. BIN
      ConsoleApp/.vs/ConsoleApp/DesignTimeBuild/.dtbcache.v2
  2. BIN
      ConsoleApp/.vs/ConsoleApp/FileContentIndex/347eff69-6073-43a2-80ed-d2076812a567.vsidx
  3. +0
    -0
      ConsoleApp/.vs/ConsoleApp/FileContentIndex/read.lock
  4. BIN
      ConsoleApp/.vs/ConsoleApp/v17/.futdcache.v2
  5. BIN
      ConsoleApp/.vs/ConsoleApp/v17/.suo
  6. BIN
      ConsoleApp/.vs/ProjectEvaluation/consoleapp.metadata.v6.1
  7. BIN
      ConsoleApp/.vs/ProjectEvaluation/consoleapp.projects.v6.1
  8. +25
    -0
      ConsoleApp/ConsoleApp.sln
  9. +8
    -0
      ConsoleApp/ConsoleApp/ConsoleApp.csproj
  10. +16
    -0
      ConsoleApp/ConsoleApp/Program.cs
  11. BIN
      MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/25f38d4f-d8d4-442b-85bd-a0990a00994d.vsidx
  12. BIN
      MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/2b481be9-83dd-4a19-8cc2-107facd1a982.vsidx
  13. BIN
      MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/2ca182c4-6298-4960-966f-c21156763eab.vsidx
  14. BIN
      MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/44ceaa17-ee24-4a3d-bcd2-16faef6e54d1.vsidx
  15. +0
    -0
      MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/read.lock
  16. BIN
      MyProjectWizard/.vs/MyProjectWizard/v17/.suo
  17. +36
    -0
      MyProjectWizard/MyProjectTemplate/AssemblyInfo.cs
  18. +12
    -0
      MyProjectWizard/MyProjectTemplate/Class1.cs
  19. +78
    -0
      MyProjectWizard/MyProjectTemplate/MyProjectTemplate.csproj
  20. BIN
      MyProjectWizard/MyProjectTemplate/MyProjectTemplate.ico
  21. +26
    -0
      MyProjectWizard/MyProjectTemplate/MyProjectTemplate.vstemplate
  22. +60
    -0
      MyProjectWizard/MyProjectTemplate/ProjectTemplate.csproj
  23. +36
    -0
      MyProjectWizard/MyProjectTemplate/Properties/AssemblyInfo.cs
  24. +51
    -0
      MyProjectWizard/MyProjectWizard.sln
  25. +120
    -0
      MyProjectWizard/MyProjectWizard/MyProjectWizard.csproj
  26. +6
    -0
      MyProjectWizard/MyProjectWizard/MyProjectWizard.csproj.user
  27. +53
    -0
      MyProjectWizard/MyProjectWizard/MyProjectWizardPackage.cs
  28. +41
    -0
      MyProjectWizard/MyProjectWizard/PrismBootstrapper.cs
  29. +33
    -0
      MyProjectWizard/MyProjectWizard/Properties/AssemblyInfo.cs
  30. +47
    -0
      MyProjectWizard/MyProjectWizard/UserInputForm.cs
  31. +27
    -0
      MyProjectWizard/MyProjectWizard/ViewModels/MainWindowViewModel.cs
  32. +11
    -0
      MyProjectWizard/MyProjectWizard/Views/MainWindow.xaml
  33. +15
    -0
      MyProjectWizard/MyProjectWizard/Views/MainWindow.xaml.cs
  34. +71
    -0
      MyProjectWizard/MyProjectWizard/WizardImplementation.cs
  35. BIN
      MyProjectWizard/MyProjectWizard/key.snk
  36. +24
    -0
      MyProjectWizard/MyProjectWizard/source.extension.vsixmanifest

BIN
ConsoleApp/.vs/ConsoleApp/DesignTimeBuild/.dtbcache.v2 Näytä tiedosto


BIN
ConsoleApp/.vs/ConsoleApp/FileContentIndex/347eff69-6073-43a2-80ed-d2076812a567.vsidx Näytä tiedosto


+ 0
- 0
ConsoleApp/.vs/ConsoleApp/FileContentIndex/read.lock Näytä tiedosto


BIN
ConsoleApp/.vs/ConsoleApp/v17/.futdcache.v2 Näytä tiedosto


BIN
ConsoleApp/.vs/ConsoleApp/v17/.suo Näytä tiedosto


BIN
ConsoleApp/.vs/ProjectEvaluation/consoleapp.metadata.v6.1 Näytä tiedosto


BIN
ConsoleApp/.vs/ProjectEvaluation/consoleapp.projects.v6.1 Näytä tiedosto


+ 25
- 0
ConsoleApp/ConsoleApp.sln Näytä tiedosto

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{70AE449F-14AD-4CB2-B0D2-575C35D03B0E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{70AE449F-14AD-4CB2-B0D2-575C35D03B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70AE449F-14AD-4CB2-B0D2-575C35D03B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70AE449F-14AD-4CB2-B0D2-575C35D03B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70AE449F-14AD-4CB2-B0D2-575C35D03B0E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3ED61CAD-690F-476E-8497-AFA4F4B9027C}
EndGlobalSection
EndGlobal

+ 8
- 0
ConsoleApp/ConsoleApp/ConsoleApp.csproj Näytä tiedosto

@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

</Project>

+ 16
- 0
ConsoleApp/ConsoleApp/Program.cs Näytä tiedosto

@@ -0,0 +1,16 @@




using System;

namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

BIN
MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/25f38d4f-d8d4-442b-85bd-a0990a00994d.vsidx Näytä tiedosto


BIN
MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/2b481be9-83dd-4a19-8cc2-107facd1a982.vsidx Näytä tiedosto


BIN
MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/2ca182c4-6298-4960-966f-c21156763eab.vsidx Näytä tiedosto


BIN
MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/44ceaa17-ee24-4a3d-bcd2-16faef6e54d1.vsidx Näytä tiedosto


+ 0
- 0
MyProjectWizard/.vs/MyProjectWizard/FileContentIndex/read.lock Näytä tiedosto


BIN
MyProjectWizard/.vs/MyProjectWizard/v17/.suo Näytä tiedosto


+ 36
- 0
MyProjectWizard/MyProjectTemplate/AssemblyInfo.cs Näytä tiedosto

@@ -0,0 +1,36 @@
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("$projectname$")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("$registeredorganization$")]
[assembly: AssemblyProduct("$projectname$")]
[assembly: AssemblyCopyright("Copyright © $registeredorganization$ $year$")]
[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("$guid1$")]

// 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")]

+ 12
- 0
MyProjectWizard/MyProjectTemplate/Class1.cs Näytä tiedosto

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
$
if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Text;

namespace $safeprojectname$
{
public class Class1
{
}
}

+ 78
- 0
MyProjectWizard/MyProjectTemplate/MyProjectTemplate.csproj Näytä tiedosto

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<TargetFrameworkProfile />
</PropertyGroup>
<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>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{04887C90-4C4E-4847-B97F-BF582FEFF02C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyProjectTemplate</RootNamespace>
<AssemblyName>MyProjectTemplate</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
<DeployVSTemplates>false</DeployVSTemplates>
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
</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="Microsoft.VisualStudio.CoreUtility">
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="AssemblyInfo.cs" />
<None Include="Class1.cs" />
<None Include="ProjectTemplate.csproj" />
<None Include="MyProjectTemplate.ico" />
</ItemGroup>
<ItemGroup>
<VSTemplate Include="MyProjectTemplate.vstemplate" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- 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>

BIN
MyProjectWizard/MyProjectTemplate/MyProjectTemplate.ico Näytä tiedosto

Before After

+ 26
- 0
MyProjectWizard/MyProjectTemplate/MyProjectTemplate.vstemplate Näytä tiedosto

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>MyProjectTemplate</Name>
<Description>MyProjectTemplate</Description>
<Icon>MyProjectTemplate.ico</Icon>
<ProjectType>CSharp</ProjectType>
<LanguageTag>csharp</LanguageTag>
<RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
<SortOrder>1000</SortOrder>
<TemplateID>470a668a-a0fa-4555-b180-549744a4f118</TemplateID>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>MyProjectTemplate</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
</TemplateData>
<TemplateContent>
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Properties\AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Class1.cs</ProjectItem>
</Project>
</TemplateContent>
<WizardExtension>
<Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=30db91e113ab33e0</Assembly>
<FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
</WizardExtension>
</VSTemplate>

+ 60
- 0
MyProjectWizard/MyProjectTemplate/ProjectTemplate.csproj Näytä tiedosto

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>$guid1$</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>$safeprojectname$</RootNamespace>
<AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v$targetframeworkversion$</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"/>
$if$ ($targetframeworkversion$ >= 3.5)
<Reference Include="System.Core"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Data.DataSetExtensions"/>
$endif$
$if$ ($targetframeworkversion$ >= 4.0)
<Reference Include="Microsoft.CSharp"/>
$endif$
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />

<Compile Include="Properties\AssemblyInfo.cs" />
</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>

+ 36
- 0
MyProjectWizard/MyProjectTemplate/Properties/AssemblyInfo.cs Näytä tiedosto

@@ -0,0 +1,36 @@
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("MyProjectTemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Company")]
[assembly: AssemblyProduct("MyProjectTemplate")]
[assembly: AssemblyCopyright("Copyright © Company 2023")]
[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("04887c90-4c4e-4847-b97f-bf582feff02c")]

// 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")]

+ 51
- 0
MyProjectWizard/MyProjectWizard.sln Näytä tiedosto

@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProjectWizard", "MyProjectWizard\MyProjectWizard.csproj", "{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProjectTemplate", "MyProjectTemplate\MyProjectTemplate.csproj", "{04887C90-4C4E-4847-B97F-BF582FEFF02C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|arm64 = Debug|arm64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|arm64 = Release|arm64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|arm64.ActiveCfg = Debug|arm64
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|arm64.Build.0 = Debug|arm64
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|x86.ActiveCfg = Debug|x86
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Debug|x86.Build.0 = Debug|x86
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|Any CPU.Build.0 = Release|Any CPU
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|arm64.ActiveCfg = Release|arm64
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|arm64.Build.0 = Release|arm64
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|x86.ActiveCfg = Release|x86
{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}.Release|x86.Build.0 = Release|x86
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|arm64.ActiveCfg = Debug|arm64
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|arm64.Build.0 = Debug|arm64
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|x86.ActiveCfg = Debug|x86
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Debug|x86.Build.0 = Debug|x86
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|Any CPU.Build.0 = Release|Any CPU
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|arm64.ActiveCfg = Release|arm64
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|arm64.Build.0 = Release|arm64
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|x86.ActiveCfg = Release|x86
{04887C90-4C4E-4847-B97F-BF582FEFF02C}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {37BD342D-ABC4-47E3-AA49-6F152BD2BF27}
EndGlobalSection
EndGlobal

+ 120
- 0
MyProjectWizard/MyProjectWizard/MyProjectWizard.csproj Näytä tiedosto

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<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>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{4F590F6A-CA66-447E-B0B9-A1DAD55B7368}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyProjectWizard</RootNamespace>
<AssemblyName>MyProjectWizard</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<UseCodebase>true</UseCodebase>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
<StartAction>Program</StartAction>
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
</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>
<Compile Include="PrismBootstrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MyProjectWizardPackage.cs" />
<Compile Include="UserInputForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ViewModels\MainWindowViewModel.cs" />
<Compile Include="Views\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="WizardImplementation.cs" />
</ItemGroup>
<ItemGroup>
<None Include="key.snk" />
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.32112.339" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.TemplateWizardInterface">
<Version>17.5.33428.366</Version>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.5.4074" />
<PackageReference Include="Prism.Unity">
<Version>8.1.97</Version>
</PackageReference>
<PackageReference Include="Prism.Wpf">
<Version>8.1.97</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyProjectTemplate\MyProjectTemplate.csproj">
<Project>{04887C90-4C4E-4847-B97F-BF582FEFF02C}</Project>
<Name>MyProjectTemplate</Name>
<VSIXSubPath>ProjectTemplates</VSIXSubPath>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<IncludeOutputGroupsInVSIX>TemplateProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="Views\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- 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>

+ 6
- 0
MyProjectWizard/MyProjectWizard/MyProjectWizard.csproj.user Näytä tiedosto

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>

+ 53
- 0
MyProjectWizard/MyProjectWizard/MyProjectWizardPackage.cs Näytä tiedosto

@@ -0,0 +1,53 @@
using Microsoft.VisualStudio.Shell;
using System;
using System.Runtime.InteropServices;
using System.Threading;
using Task = System.Threading.Tasks.Task;

namespace MyProjectWizard
{
/// <summary>
/// This is the class that implements the package exposed by this assembly.
/// </summary>
/// <remarks>
/// <para>
/// The minimum requirement for a class to be considered a valid package for Visual Studio
/// is to implement the IVsPackage interface and register itself with the shell.
/// This package uses the helper classes defined inside the Managed Package Framework (MPF)
/// to do it: it derives from the Package class that provides the implementation of the
/// IVsPackage interface and uses the registration attributes defined in the framework to
/// register itself and its components with the shell. These attributes tell the pkgdef creation
/// utility what data to put into .pkgdef file.
/// </para>
/// <para>
/// To get loaded into VS, the package must be referred by &lt;Asset Type="Microsoft.VisualStudio.VsPackage" ...&gt; in .vsixmanifest file.
/// </para>
/// </remarks>
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[Guid(MyProjectWizardPackage.PackageGuidString)]
public sealed class MyProjectWizardPackage : AsyncPackage
{
/// <summary>
/// MyProjectWizardPackage GUID string.
/// </summary>
public const string PackageGuidString = "41d00f6a-8181-4be4-9800-ad57fa694e50";

#region Package Members

/// <summary>
/// Initialization of the package; this method is called right after the package is sited, so this is the place
/// where you can put all the initialization code that rely on services provided by VisualStudio.
/// </summary>
/// <param name="cancellationToken">A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.</param>
/// <param name="progress">A provider for progress updates.</param>
/// <returns>A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.</returns>
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
// When initialized asynchronously, the current thread may be a background thread at this point.
// Do any initialization that requires the UI thread after switching to the UI thread.
await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
}

#endregion
}
}

+ 41
- 0
MyProjectWizard/MyProjectWizard/PrismBootstrapper.cs Näytä tiedosto

@@ -0,0 +1,41 @@
using MyProjectWizard.ViewModels;
using MyProjectWizard.Views;
using Prism.Ioc;
using Prism.Unity;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace MyProjectWizard
{
class Bootstrapper : PrismBootstrapper
{
protected override DependencyObject CreateShell()
{
var mainWindow = Container.Resolve<MainWindow>();

return mainWindow;
}
protected override void OnInitialized()
{

if (Shell is Window window)
{
MainWindowViewModel vm = (MainWindowViewModel)window.DataContext;
vm.OnRequestClose += (s, e) => window.Close();
window.ShowDialog();
}
}

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{

}
}
}

+ 33
- 0
MyProjectWizard/MyProjectWizard/Properties/AssemblyInfo.cs Näytä tiedosto

@@ -0,0 +1,33 @@
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("MyProjectWizard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyProjectWizard")]
[assembly: AssemblyCopyright("")]
[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)]

// 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")]

+ 47
- 0
MyProjectWizard/MyProjectWizard/UserInputForm.cs Näytä tiedosto

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyProjectWizard
{
public partial class UserInputForm : Form
{
private static string customMessage;
private TextBox textBox1;
private Button button1;

public UserInputForm()
{
this.Size = new System.Drawing.Size(155, 265);

button1 = new Button();
button1.Location = new System.Drawing.Point(90, 25);
button1.Size = new System.Drawing.Size(50, 25);
button1.Click += button1_Click;
this.Controls.Add(button1);

textBox1 = new TextBox();
textBox1.Location = new System.Drawing.Point(10, 25);
textBox1.Size = new System.Drawing.Size(70, 20);
this.Controls.Add(textBox1);
}
public static string CustomMessage
{
get
{
return customMessage;
}
set
{
customMessage = value;
}
}
private void button1_Click(object sender, EventArgs e)
{
customMessage = textBox1.Text;
this.Close();
}
}
}

+ 27
- 0
MyProjectWizard/MyProjectWizard/ViewModels/MainWindowViewModel.cs Näytä tiedosto

@@ -0,0 +1,27 @@
using Microsoft.VisualStudio.PlatformUI;
using Microsoft.VisualStudio.Shell.Interop;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyProjectWizard.ViewModels
{
public class MainWindowViewModel:BindableBase
{
public event EventHandler OnRequestClose;
public DelegateCommand SubmitCommand { get; private set; }
public MainWindowViewModel()
{
SubmitCommand = new DelegateCommand(Submit);
}
void Submit()
{
OnRequestClose(this, new EventArgs());
}
}
}

+ 11
- 0
MyProjectWizard/MyProjectWizard/Views/MainWindow.xaml Näytä tiedosto

@@ -0,0 +1,11 @@
<Window x:Class="MyProjectWizard.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
Title="Shell" Height="350" Width="525">
<Grid>
<Button Command="{Binding SubmitCommand}" Content="click"/>
</Grid>
</Window>

+ 15
- 0
MyProjectWizard/MyProjectWizard/Views/MainWindow.xaml.cs Näytä tiedosto

@@ -0,0 +1,15 @@
using System.Windows;

namespace MyProjectWizard.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

+ 71
- 0
MyProjectWizard/MyProjectWizard/WizardImplementation.cs Näytä tiedosto

@@ -0,0 +1,71 @@
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio.TemplateWizard;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyProjectWizard
{
public class WizardImplementation : IWizard
{
private UserInputForm inputForm;
private string customMessage;
private Bootstrapper bootstrapper;
private DTE2 _dte;
// This method is called before opening any item that
// has the OpenInEditor attribute.
public WizardImplementation()
{
bootstrapper = new Bootstrapper();
}
public void BeforeOpeningFile(ProjectItem projectItem)
{
}

public void ProjectFinishedGenerating(Project project)
{
}

// This method is only called for item templates,
// not for project templates.
public void ProjectItemFinishedGenerating(ProjectItem
projectItem)
{
}

// This method is called after the project is created.
public async void RunFinished()
{
bootstrapper.Run();
_dte.Solution.Close();
try
{
Task.Delay(1000);
_dte.Solution.Open("C:\\Users\\chris\\Desktop\\ConsoleApp\\ConsoleApp.sln");
}
catch
{

}
}

public void RunStarted(object automationObject,
Dictionary<string, string> replacementsDictionary,
WizardRunKind runKind, object[] customParams)
{
_dte = (DTE2)automationObject;
}

// This method is only called for item templates,
// not for project templates.
public bool ShouldAddProjectItem(string filePath)
{
return true;
}
}
}

BIN
MyProjectWizard/MyProjectWizard/key.snk Näytä tiedosto


+ 24
- 0
MyProjectWizard/MyProjectWizard/source.extension.vsixmanifest Näytä tiedosto

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="MyProjectWizard.e3bd17a4-4464-4463-a0a1-239d718e2c08" Version="1.0" Language="en-US" Publisher="Company" />
<DisplayName>MyProjectWizard</DisplayName>
<Description>Empty VSIX Project.</Description>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,18.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" AssemblyName="|%CurrentProject%;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="MyProjectTemplate" d:TargetPath="|MyProjectTemplate;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
</Assets>
</PackageManifest>

Loading…
Peruuta
Tallenna