customtool

Using Studio's “Custom Tool” in MSBuild

元气小坏坏 提交于 2019-12-22 03:49:02
问题 I've got a "Custom Tool" for Visual Studio to munge some template files into code. For consistency and portability I'd like to be able to run this template processor from MSBuild when building outside of Visual Studio. Visual Studio creates the following snippets for the files: <!-- the template --> <None Include="Template.in"> <Generator>Template Processor</Generator> <LastGenOutput>Template.in.Designer.cs</LastGenOutput> </None> <!-- generated file --> <Compile Include="Template.in.Designer

How to hide files generated by custom tool in Visual Studio

偶尔善良 提交于 2019-12-17 15:26:41
问题 I would like the files generated by my custom tool to be hidden, but I cannot find any documentation on how this is done. An example of what I'm looking for is WPF code behind files. These files are not displayed in the Visual Studio project view, yet are compiled with the project and are available in IntelliSense. WPF code behind files (Window1.g.i.cs, for example), are generated by a custom tool. 回答1: The solution is to create a Target that adds your files to the Compile ItemGroup rather

Custom tool error Failed to generate code

拜拜、爱过 提交于 2019-12-13 01:26:49
问题 Why this error is appearing? I was just setting some default values in a dataset designer... its second time that this is appearing... "Custom tool error Failed to generate code. Exception of type 'System.OutOfMemoryException' was thrown" 回答1: I just found a way to regenerate codes. In Solution Explorer right click on your DataSet and click Run Custom Tool . I do it after closing and reopening VS2010... Hope this help you, if you faced the problem... good luck 来源: https://stackoverflow.com

Why is my Visual Studio 2010 custom tool not being found?

无人久伴 提交于 2019-12-12 02:15:04
问题 My custom tool is as follows: Class: FooBar.Blah.Tools.DataContextClassGenerator Assembly: FooBar.Blah.Tools.DataContextClassGenerator Project: FooBar.Blah.Tools.DataContextClassGenerator The CreatePkgDef task enabled from within the project file by setting GeneratePkgDef to true creates the following pkgdef file in the build outputs. [$RootKey$\Generators\{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\DataContextClassGenerator] @="Foo Bar DataContext Class Generator" "CLSID"="{2155fcee-7012-400b

Two Custom tool s for a single file?

青春壹個敷衍的年華 提交于 2019-12-11 06:45:16
问题 I want to generate some code from my dbml(Linq to Sql) file,the dbml file is placed in many part of my project So I wrote a custom tool for this purpose But the problem is that dbml already has contained MSLinqToSQLGenerator custom tool , So do you know any way to set two custom tools for one file, If no, Let me know your idea about that 回答1: Visual Studio will only support a single "Custom Tool" per file, but you can add a pre-compilation step to run other tools against anything you want.

Run Custom Tool for entire solution

北慕城南 提交于 2019-12-08 14:38:04
问题 Is there a way to 'Run Custom Tool' for an entire solution? Why? The custom tool is under development and when changes are made I need to refresh all the items that use it to make sure nothing breaks. 回答1: Since I needed an answer for this and had to make it myself, here is the solution for "Run Custom Tool". If you just need to run all your T4 templates again, then since VS2012 there is Transform all T4 in the Build menu. For VS2017 they have removed macros, so follow https://msdn.microsoft

Custom tool shortcut visual studio

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 17:02:35
问题 Is there a way to create a shortcut for a custom tool in visual studio? At the moment I have to navigate to the tool in the solution, right click and run custom tool. It would be nice if I could either bind a shortcut key or run the tool from the toolbar. Does anyone know of a way to do this? 回答1: I think you are looking for this: Go to Tools -> External tools Configure your tool Go to Tools -> Options -> Environment -> Keyboard In Show commands containing type: Tools.ExternalCommand Choose

Visual Studio custom tool for code generation… how do I find out what's going wrong?

ぐ巨炮叔叔 提交于 2019-12-06 03:46:45
问题 I'm trying to create a custom tool for code generation in Visual Studio 2010. First I register it: "$(FrameworkSDKDir)Bin\NETFX 4.0 Tools\gacutil.exe" /if "$(TargetPath)" Then I add it via a reg key: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\CLSID\{6A96476E-74F3-4AB3-9CCA-F15EC6104D84}] "RuntimeVersion"="v4.0.30319" "Class"="MapBuildTool.MapFileGenerator" "Assembly"="MapBuildTool, Version=1.0.0.0, Culture=en-US, PublicKeyToken=7d8abca94a1e38ae" "ThreadingModel"=

Using Studio's “Custom Tool” in MSBuild

浪尽此生 提交于 2019-12-05 01:34:00
I've got a "Custom Tool" for Visual Studio to munge some template files into code. For consistency and portability I'd like to be able to run this template processor from MSBuild when building outside of Visual Studio. Visual Studio creates the following snippets for the files: <!-- the template --> <None Include="Template.in"> <Generator>Template Processor</Generator> <LastGenOutput>Template.in.Designer.cs</LastGenOutput> </None> <!-- generated file --> <Compile Include="Template.in.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Template.in</DependentUpon>

Custom tool shortcut visual studio

依然范特西╮ 提交于 2019-12-05 00:06:09
Is there a way to create a shortcut for a custom tool in visual studio? At the moment I have to navigate to the tool in the solution, right click and run custom tool. It would be nice if I could either bind a shortcut key or run the tool from the toolbar. Does anyone know of a way to do this? I think you are looking for this: Go to Tools -> External tools Configure your tool Go to Tools -> Options -> Environment -> Keyboard In Show commands containing type: Tools.ExternalCommand Choose the command you want and set a shortcut for it. In the External tools , the gotcha is that the number of the