Search Results

Search found 5 results on 1 pages for 'customtool'.

Page 1/1 | 1 

  • How to deploy a visual studio custom tool?

    - by Aen Sidhe
    Hello. I have a my own custom tool for Visual Studio 2008 SP1. It consists of 5 assemblies: 3 assemblies with code that used heavily in my other projects, 1 assembly-wrapper above VS2008 SDK and assembly with the tool. If I'd debug my tool from visual studio, using "Run external program" option with command line "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" and arguments "/ranu /rootsuffix Exp" all work perfectly. After that I trying to deploy it to my working VS copy, not to experimental hive doing: gacutil /i Asm1.dll for all my assemblies and doing RegAsm Asm1.dll only for assembly with custom tool. Neither of utils prints any error, all work as planned, even registry keys appeared. But my tool don't work even after PC restart. What did I do wrong? Wrapper looks like that: [ComVisible(true)] public abstract class CustomToolBase : IVsSingleFileGenerator, IObjectWithSite { #region IVsSingleFileGenerator Members int IVsSingleFileGenerator.DefaultExtension(out string pbstrDefaultExtension) { pbstrDefaultExtension = ".cs"; return 0; } int IVsSingleFileGenerator.Generate(string wszInputFilePath, string bstrInputFileContents, string wszDefaultNamespace, IntPtr[] rgbOutputFileContents, out uint pcbOutput, IVsGeneratorProgress pGenerateProgress) { GenerationEventArgs gea = new GenerationEventArgs( bstrInputFileContents, wszInputFilePath, wszDefaultNamespace, new ServiceProvider(Site as Microsoft.VisualStudio.OLE.Interop.IServiceProvider) .GetService(typeof(ProjectItem)) as ProjectItem, new GenerationProgressFacade(pGenerateProgress) ); if (OnGenerateCode != null) { OnGenerateCode(this, gea); } byte[] bytes = gea.GetOutputCodeBytes(); int outputLength = bytes.Length; rgbOutputFileContents[0] = Marshal.AllocCoTaskMem(outputLength); Marshal.Copy(bytes, 0, rgbOutputFileContents[0], outputLength); pcbOutput = (uint)outputLength; return VSConstants.S_OK; } #endregion #region IObjectWithSite Members void IObjectWithSite.GetSite(ref Guid riid, out IntPtr ppvSite) { IntPtr pUnk = Marshal.GetIUnknownForObject(Site); IntPtr intPointer = IntPtr.Zero; Marshal.QueryInterface(pUnk, ref riid, out intPointer); ppvSite = intPointer; } void IObjectWithSite.SetSite(object pUnkSite) { Site = pUnkSite; } #endregion #region Public Members public object Site { get; private set; } public event EventHandler<GenerationEventArgs> OnGenerateCode; [ComRegisterFunction] public static void Register(Type type) { using (var parent = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\VisualStudio\9.0", true)) foreach (CustomToolRegistrationAttribute ourData in type.GetCustomAttributes(typeof(CustomToolRegistrationAttribute), false)) ourData.Register(x => parent.CreateSubKey(x), (x, name, value) => x.SetValue(name, value)); } [ComUnregisterFunction] public static void Unregister(Type type) { using (var parent = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\VisualStudio\9.0", true)) foreach (CustomToolRegistrationAttribute ourData in type.GetCustomAttributes(typeof(CustomToolRegistrationAttribute), false)) ourData.Unregister(x => parent.DeleteSubKey(x, false)); } #endregion } My tool code: [ComVisible(true)] [Guid("55A6C192-D29F-4e22-84DA-DBAF314ED5C3")] [CustomToolRegistration(ToolName, typeof(TransportGeneratorTool))] [ProvideObject(typeof(TransportGeneratorTool))] public class TransportGeneratorTool : CustomToolBase { private const string ToolName = "TransportGeneratorTool"; public TransportGeneratorTool() { OnGenerateCode += GenerateCode; } private static void GenerateCode(object s, GenerationEventArgs e) { try { var serializer = new XmlSerializer(typeof (Parser.System)); using (var reader = new StringReader(e.InputText)) using (var writer = new StringWriter(e.OutputCode)) { Generator.System = (Parser.System) serializer.Deserialize(reader); Generator.System.Namespace = e.Namespace; Generator.GenerateSource(writer); } } catch (Exception ex) { e.Progress.GenerateError(ex.ToString()); } } } Resulting registry keys: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators\{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators\{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\TransportGeneratorTool] @="TransportGeneratorTool" "CLSID"="{55a6c192-d29f-4e22-84da-dbaf314ed5c3}" "GeneratesDesignTimeSource"=dword:00000001 "GeneratesSharedDesignTimeSource"=dword:00000001

    Read the article

  • How to hide files generated by custom tool in Visual Studio

    - by jws
    WPF code behind is not displayed in the Visual Studio project view, yet is compiled with the project and is available in IntelliSense. This code behind file (Window1.g.i.cs, for example), is generated by a custom tool. I would like the files generated by my custom tool to be hidden as well, but I cannot find any documentation on how this is done. How can I do this?

    Read the article

  • Why does localization with resx files fail with ZH (chinese) only?

    - by Trey Carroll
    Howdy All, I've been tasked with localizing an English language ASP.NET MVC 2.0 website into 7 additional languages. I've added resource files to the Views Home App_LocalResources folder: Example: Index.resx, Index.es.resx, Index.fr.resx, Index.zh.resx, etc. I have set the CustomTool to PublicResXFileCodeGenerator (Access modifier is Public), Set file as an Embedded Resource, Set a Custom Tool Namespace. The keys ("Name") in all of the files are the same. For 7 languages this works perfectly. If I go into IE 8 settings and change the language to de,fr,it, etc., the page shows the appropriate translated strings. However, when I set the language in the Browser to any of the zh (Simplified Chinese) variants localization completely fails and the English strings are displayed. Is there something special about Simplified Chinese? Japanese and Korean work without problems. TIA, Trey Carroll

    Read the article

  • How do I access the CodeDomProvider from a class inheriting from Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite?

    - by Charlie
    Does anyone know how to get a CodeDomProvider in the new Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite from the Visual Studio 2010 SDK? I used to get access to it just by in mere inheritance of the class Microsoft.CustomTool.BaseCodeGeneratorWithSite, but now with this new class it is not there. I see a GlobalServiceProvider and a SiteServiceProvider but I can't find any example on how to use them. Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite: http://msdn.microsoft.com/en-us/library/bb932625.aspx I was to do this: public class Generator : Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite { public override string GetDefaultExtension() { // GetDefaultExtension IS ALSO NOT ACCESSIBLE... return this.InputFilePath.Substring(this.InputFilePath.LastIndexOf(".")) + ".designer" + base.GetDefaultExtension(); } // This method is being called every time the attached xml is saved. protected override byte[] GenerateCode(string inputFileName, string inputFileContent) { try { // Try to generate the wrapper file. return GenerateSourceCode(inputFileName); } catch (Exception ex) { // In case of a faliure - print the exception // as a comment in the source code. return GenerateExceptionCode(ex); } } public byte[] GenerateSourceCode(string inputFileName) { Dictionary<string, CodeCompileUnit> oCodeUnits; // THIS IS WHERE CodeProvider IS NOT ACCESSIBLE CodeDomProvider oCodeDomProvider = this.CodeProvider; string[] aCode = new MyCustomAPI.GenerateCode(inputFileName, ref oCodeDomProvider); return Encoding.ASCII.GetBytes(String.Join(@" ", aCode)); } private byte[] GenerateExceptionCode(Exception ex) { CodeCompileUnit oCode = new CodeCompileUnit(); CodeNamespace oNamespace = new CodeNamespace("System"); oNamespace.Comments.Add(new CodeCommentStatement(MyCustomAPI.Print(ex))); oCode.Namespaces.Add(oNamespace); string sCode = null; using (StringWriter oSW = new StringWriter()) { using (IndentedTextWriter oITW = new IndentedTextWriter(oSW)) { this.CodeProvider.GenerateCodeFromCompileUnit(oCode, oITW, null); sCode = oSW.ToString(); } } return Encoding.ASCII.GetBytes(sCode ); } } Thanks for your help!

    Read the article

  • CodePlex Daily Summary for Wednesday, December 19, 2012

    CodePlex Daily Summary for Wednesday, December 19, 2012Popular ReleasesToolbox for Dynamics CRM 2011: XrmToolBox (1.0.0.0): Initial Release Contains following tools: Attribute Bulk Updater Iconator Role Updater Scripts Finder SiteMap Editor Solution Import View Layout Replicator WebResources Manager Also include the sample tool described in the documentation "How to develop your own tool" More tools to come later...NB_Store - Free DotNetNuke Ecommerce Catalog Module: NB_Store v2.3.3 Rel0: DNN 5.3.2 and above, and DNN 6 Compatible - Some release notes are discussed here. Important : v2.3.3 requires the Back Office module to be placed onto a seperate page to the productlist. During the upgrade process, this module retains your existing configuration by not overwriting any existing settings and templates. If you wish to reset your configuration to gain all new settings and templates, please review this KB article. Please view the following documentation if you are installing ...F# PowerPack with F# Compiler Source Drops: PowerPack for FSharp 3.0 + .NET 4.x + VS2010: This is a release of the old FSharp Power Pack binaries recompiled for F# 3.0, .NET 4.0/4.5 and Silveright 5. NOTE: This is for F# 3.0 & .NET 4.0 or F# 3.0 & Silverlight 5 NOTE: The assemblies are no longer strong named NOTE: The assemblies are not added to the GAC NOTE: In some cases functionality overlaps with F# 3.0, e.g. SI Units of measurecodeSHOW: codeSHOW AppPackage Release 16: This release is a package file built out of Visual Studio that you can side load onto your machine if for some reason you don't have access to the Windows Store. To install it, just unzip and run the .ps1 file using PowerShell (right click | run with PowerShell). Attention: if you want to download the source code for codeSHOW, you're in the wrong place. You need to go to the SOURCE CODE tab.Move Mouse: Move Mouse 2.5.3: FIXED - Issue where it errors on load if the screen saver interval is over 333 minutes.LINUX????????: LINUX????????: LINUX????????cnbeta: cnbeta: cnbetaCSDN ??: CSDN??????: CSDN??????PowerShell Community Extensions: 2.1.1 Production: PowerShell Community Extensions 2.1.1 Release NotesDec 16, 2012 This version of PSCX supports both Windows PowerShell 2.0 and 3.0. Bug fix for HelpUri error with the Get-Help proxy command. See the ReleaseNotes.txt download above for more information.VidCoder: 1.4.11 Beta: Added Hungarian translation, thanks to Brechler Zsolt. Update HandBrake core to SVN 5098. This update should fix crashes on some files. Updated the enqueue split button to fit in better with the active Windows theme. Updated presets to use x264 preset/profile/level.???: Cnblogs: CNBLOGSSandcastle Help File Builder: SHFB v1.9.6.0 with Visual Studio Package: General InformationIMPORTANT: On some systems, the content of the ZIP file is blocked and the installer may fail to run. Before extracting it, right click on the ZIP file, select Properties, and click on the Unblock button if it is present in the lower right corner of the General tab in the properties dialog. This new release contains bug fixes and feature enhancements. There are some potential breaking changes in this release as some features of the Help File Builder have been moved into...Electricity, Gas and Temperature Monitoring with Netduino Plus: V1.0.1 Netduino Plus Monitoring: This is the first stable release from the Netduino Plus Monitoring program. Bugfixing The code is enhanced at some places in respect to the V0.6.1 version There is a possibility to add multiple S0 meters Website for realtime display of data Website for configuring the Netduino Comments are welcome! Additions will not be made to this version. This is the first and last major Netduino Plus V1 release. The new development will take place with the Netduino Plus V2 development board in mi...Windows Store Application Library: Windows Store Application Library - 1.1.1.0: Windows Store Application Library StoreAppLib can be installed from Visual Studio "Manage NuGet Packages" tool. This release of Windows Store Application Library contains following controls and utilities. DatePicker control TimePicker control PageHeaderTextBlock control with Global Navigation Menu Popup manager AppBarButton control TapEffect animation DateTimeConverter ConcatenationConverter CountConverterCRM 2011 Visual Ribbon Editor: Visual Ribbon Editor (1.3.1116.8): [FIX] Fixed issue not displaying CRM system button images correctly (incorrect path in file VisualRibbonEditor.exe.config)My Expenses Windows Store LOB App Demo: My Expenses Version 1: This is version 1 of the MyExpenses Windows 8 line of business demo app. The app is written in XAML and C#. It calls a WCF service that works with a SQL Server database. The app uses the Callisto toolkit. You can get it at https://github.com/timheuer/callisto. The Expenses.sql file contains the SQL to create the Expenses database. The ExpensesWCFService.zip file contains the WCF service, also written in C#. You should create a WCF service. Create an Entity Framework model and point it to...Manage upload files for SP 2010: Manage upload files (SP 2010) 1.0.0: Version 1.0.0: Manage upload file size on specific application page Simple in use Simple installation Work on: SharePoint Foundation 2010 Sharepoint Server 2010 (Standard, Enterprise) Localized: English RussianMCEBuddy Viewer: MCEBuddy Viewer 1.0.0 Beta: MCEBuddy Viewer for MCEBuddy 2.x Windows Media Center Add-On to view the current job status of MCEbuddy. Requirements: 1. Installed MCEBuddy 2.x (tested on release 2.3.7-2.3.10) http://mcebuddy2x.codeplex.com 2. Windows Media Center (tested on Windows 7 Pro 32-bit&64-bit, Windows 8 Pro with WMC 64-bit) Before installing the new version of Plug-in uninstall old version through windows control panelBlackJumboDog: Ver5.7.4: 2012.12.13 Ver5.7.4 (1)Web???????、???????????????????????????????????????????VFPX: ssClasses A1.0: My initial release. See https://vfpx.codeplex.com/wikipage?title=ssClasses&referringTitle=Home for a brief description of what is inside this releaseNew ProjectsAutonomic Middleware: Reflective middleware using workflow that makes the middleware autonomic.Battleforge: Assault: A card battle game. This project is being built using Silverlight 4 in C#.ChurajPatterns: Design patterns testing and overview console application.FimExplorer: Tool for executing XPath queries against FIM without going through it's web portal.Financial Management Studio: This is a WPF application for the financial management. Will use bunch of technologies such as: MVVM, Microsoft Extension Framework and Entities Framework.iJob: Do u no what is this?Developed with C#.net3.5 MSSQL2008Interaction Production Server: A software based networked lighting controller. It brokers many protocols together to allow easy setup and development of new stage lighting controllers.Interface weaver Custom Tool: A CustomTool for vs auto implementing interface based on aspects (auto INotifyPropertychanged data context implementation, auto command mapping...).IntroductionWeb: This is the second time for us to build something extraordinaryiSteam: iSteam is a product being developed focusing on the Steamworks platform, to advertise and centralize everything about steam in one application.iSun_PLS: iSun PLS is a Photo libary System, to help you manager your pictures on your server!LSharp: A Scripting Language Interpreter for .NETMassive Dangerzone: Don't try this at home.MinGuid: An alternative / replacement for those long Guid strings, simply call the function in the library which generates the Unique 16 character string.Nx Portable Framework: Framework aiming to speed up cross platform movile developement.Orchard Training Demo module: Demo Orchard module for training purposes. This module completes the training materials at http://english.orchardproject.hu/Training/Oriol ASAP: ASAPPanopticonize API: This project provides code samples for the panopticonize.com video thumbnailing API.Registry Editor Navigator: The small utility that takes a path and makes Regedit open to that path. Similar to RegJump but it has UI, uses clipboard and has a global keyboard hook. SafetyExam: ??????????????Simple Queuing System: This project is created to show you how queuing system can be implemented in MSMQ in C#. The sample is implemented from real life queuing system. TypeScript plugin enhancements for VS 2010 add-in: This add-in allows to - Compile .ts files by saveVisual Studio Help Downloader 2012: Tool for downloading the Visual Studio 2012 help packages for offline useWebGoat.NET test repository: THis is a clone of the WebGoat.NET project hosted at GitHub, provided here for those who need to be able to have a TFS-accessible copy of WebGoat.WebPythonHost: A .NET application hosting web python environment.Wpf Sqlite Management: about 1 month i publish this project and use avalon edit and avalon doc in my project WPFSchematics: The WPFSchematics is a vector graphic interactive system,and based on WPF graphics technology.XEasyFileSearch: easy and quick file searcherZweiBooks: Plugin for a Bukkit-Server.

    Read the article

1