Search Results

Search found 16615 results on 665 pages for 'visual studio (vs2010)'.

Page 6/665 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Visual Studio 2012 crashes everytime I try to debug with error CLR20r3

    - by Chris
    Everytime I try to debug one of my apps I get the below error message. Anyone have any ideas? I tried running Visual Studio in safe mode but I get the same thing. I also tried to repair the install and completely reinstall it with no luck :(. The full Problem Signature is this: Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: devenv.exe Problem Signature 02: 11.0.50727.1 Problem Signature 03: 5011ecaa Problem Signature 04: Microsoft.IntelliTrace.Package.11.0.0 Problem Signature 05: 11.0.50727.1 Problem Signature 06: 5011dad8 Problem Signature 07: 311 Problem Signature 08: 1f1 Problem Signature 09: System.AccessViolationException OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    Read the article

  • GSL-GNU in Visual studio

    - by Arman
    I have visual studio 2008, I want to integrate GSL library in my project, kindly give me some guidelines so that I can make it possible. I have added the GSL library but the following error come. Error 1 error LNK2028: unresolved token (0A000010) "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" (?gsl_matrix_set@@$$J0YAXPAUgsl_matrix@@IIN@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ) Error 2 error LNK2028: unresolved token (0A000011) "extern "C" struct gsl_matrix * __cdecl gsl_matrix_alloc(unsigned int,unsigned int)" (?gsl_matrix_alloc@@$$J0YAPAUgsl_matrix@@II@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ) Error 3 error LNK2028: unresolved token (0A000014) "extern "C" double __cdecl gsl_matrix_get(struct gsl_matrix const *,unsigned int,unsigned int)" (?gsl_matrix_get@@$$J0YANPBUgsl_matrix@@II@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ) Error 4 error LNK2019: unresolved external symbol "extern "C" double __cdecl gsl_matrix_get(struct gsl_matrix const *,unsigned int,unsigned int)" (?gsl_matrix_get@@$$J0YANPBUgsl_matrix@@II@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ) Error 5 error LNK2019: unresolved external symbol "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" (?gsl_matrix_set@@$$J0YAXPAUgsl_matrix@@IIN@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)

    Read the article

  • Visual studio 2008 Professional Edition acting weird

    - by Andres
    I have a weird situation on a winform project. I have user control (with 600 lines of code around) with a datagridview. I change de ColumnHeaderStyle of the font and save it. After I save the file I close it and open again, the changes were not saved (although the asterisk is dissapeared), because the ColumnHeaderStyle is back to the former value. This is driving me crazy because I cannot change any visual thing in the Designer. Any clue? Thanks in advance.

    Read the article

  • "Error generating Win32 resource" in Visual Studio, Windows 7 x64

    - by Jerad Rose
    My co-developers and I recently upgraded machines to Windows 7 Ultimate 64 bit. Some of us are seeing a new error we used to never see when building solutions in Visual Studio (happens in both 2008 and 2010): Error generating Win32 resource: The process cannot access the file because it is being used by another process. It always points to some temp file in our output folder, for example: MyProject\obj\Debug\CSC5123.tmp This happens about once every four or so builds. We then will try to run the same exact build again, and it will usually succeed. In some cases though, it will fail again on the same project, and in same cases, it will fail on a different project. There's really no rhyme or reason to it. But it's very frustrating, especially when it doesn't happen until the build has been running for 20 or so seconds. This also doesn't happen to all of our coworkers. It happens to about one out of four developers. For the one, it happens about one of four builds, and for the other three, it never happens. Oh, and did I mention we're all using machines built from the same image? :) Thanks in advance for any direction you can provide.

    Read the article

  • Using a Visual Sourcesafe 2005 database with VB6 still launches VSS 6.0d

    - by John Galt
    I know all versions of VSS have many horror stories and I feel I will escape to a better source control mechanism someday but in the short term I am just trying to do a little cleanup and would like your advice on this issue: Objective - consolidate old VB6 source code in a "new" VSS 2005 database (currently all these old projects are checked in to an "old" VSS 6.0d database); eventually, eliminate the "old" VSS. Progress so far - The new VSS 2005 database now contains a mixture of projects. Some are using Visual Studio 2008, some use Vstudio 2005, and the more recently added ones are the above mentioned VB6 projects. Individually all these projects and "solutions" come up OK, I can check in - check out, launch SourceSafe, view differences, etc. But all the VB6 projects now in a VSS 2005 database launch VSS 6.0d when asked, rather than VSS 2005. Is this normal and just something to cope with until I get to some better nonVSS approach? Or can VB6 be re-configured someway to launch VSS 2005 when I click Tools-SourceSafe-Run SourceSafe? I seem to recall VSS 6.0d got "integrated" into VB6 by way of the "Add-In Manager". At this point, the development PC with VB6 installed has both VSS 2005 and VSS 6.0d clients installed.

    Read the article

  • Visual Studio Conversion Suite

    - by KingPop
    I have this as my conversion program for the "Length", how can I do it the simpliest way instead of keeping the if, elseif, else too much, i do not have much experience and trying to improve my programming skills on visual studio 2008. Basically, I get annoyed with the formulas because I don't know if it is right, I use google but doesn't help because i don't know how to get it right when the program converts from type to type. Public Class Form2 Dim Metres As Integer Dim Centimetres As Integer Dim Inches As Integer Dim Feet As Integer Dim Total As Integer Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ErrorMsg.Hide() End Sub Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConvert.Click Metres = 1 Centimetres = 0.01 Inches = 0.0254 Feet = 0.3048 txtTo.Text = 0 If txtFrom.Text <> "" Then If IsNumeric(txtFrom.Text) And IsNumeric(txtTo.Text) Then If cbFrom.Text = "Metres" And cbTo.Text = "Centimetres" Then Total = txtFrom.Text * Metres txtTo.Text = Total ElseIf cbFrom.Text = "Metres" And cbTo.Text = "Inches" Then Total = txtFrom.Text * 100 txtTo.Text = Total ElseIf cbFrom.Text = "Metres" And cbTo.Text = "Feet" Then ElseIf cbFrom.Text = "Centimetres" And cbTo.Text = "Metres" Then ElseIf cbFrom.Text = "Centimetres" And cbTo.Text = "Inches" Then ElseIf cbFrom.Text = "Centimetres" And cbTo.Text = "Feet" Then ElseIf cbFrom.Text = "Inches" And cbTo.Text = "Metres" Then ElseIf cbFrom.Text = "Inches" And cbTo.Text = "Centimetres" Then ElseIf cbFrom.Text = "Inches" And cbTo.Text = "Feet" Then ElseIf cbFrom.Text = "Feet" And cbTo.Text = "Metres" Then ElseIf cbFrom.Text = "Feet" And cbTo.Text = "Centimetres" Then ElseIf cbFrom.Text = "Feet" And cbTo.Text = "Inches" Then End If End If End If End Sub End Class This is the source for what I have done at the moment.

    Read the article

  • visual studio 2008 vs 2010 Pro unmanaged code

    - by bartek
    Hi, I'm a C++ programmer, I use Visual Studio 2008 Professional, only unmanaged code. I'm thinking of buying VS 2010 Pro. I'm confused, I don't know what are differences between those two. I know that, in plus, it has tr1 included. When I started using 2008 edition I was very pleased to see f.e. unit testing support but all new features are only for managed code. The C++ debugger in 2008 is very good, better than 2003 edition one. I would't like to buy a new tool and discover that I gained nothing and lost some functionality ( because f.e. something was moved to higher version). Once upon a time I switched from very good VS6 to VS 2003.Net and imagine what, after some time I discovered that Pro has no support for code optimalization. It is wonderful how Microsoft makes money. I wouldn't like to experience something like that again. What do you think, what can you recommended?

    Read the article

  • Visual Studio 2005 to VS 2008

    - by Adi
    hi all, I am a newbie in working on VS IDE and have not much experience in how the different libraries and files are linked in it. I have to build a OpenCV project which was made in VS2005 by one of my colleagues into VS2008. The project is for blob detection. Following is what he has to say in readme : Steps to use the library (using MSVC++ sp 5): 1 - open the project of the library and build it 2 - in the project where the library should be used, add: 2.1 In "Project/Settings/C++/Preprocessor/Additional Include directories" add the directory where the blob library is stored 2.2 In "Project/Settings/Link/Input/Additional library path" add the directory where the blob library is stored and in "Object/Library modules" add the cvblobslib.lib file 3- Include the file "BlobResult.h" where you want to use blob variables. 4- To see an example on using the blob library, see the file example.txt inside the zip file. NOTE: Verify that in the project where the cvblobslib.lib is used, the MFC Runtime Libraries are not mixed: Check in "Project-Settings-C/C++-Code Generation-Use run-time library" of your project and set it to Debug Multithreaded DLL (debug version ) or to Multithreaded DLL ( release version ). 2 Check in "Project-Settings-General" how it uses the MFC. It should be "Use MFC in a shared DLL". NOTE: The library can be compiled and used in .NET using this steps, but the menu options may differ a little NOTE2: In the .NET version, the character sets must be equal in the .lib and in the project. [OpenCV yahoo group: Msg 35500] Can anyone explain me , how to go about in doing this in VS2008. I would also appreciate if someone can explain me how the different libraries are linked , what is Debug, What is Release and all in a Visual Studio project folder we have.\ Thanks in advance Aditya

    Read the article

  • Editing source from a Visual Studio 2008 project in Visual Studio 2010

    - by fatcat1111
    I work in a large team, and not everybody has upgraded from VS 2008 to VS 2010, though I have. I have a maintenance bug in a VS 2008 project, and have been told that I cannot upgrade the project file. Is there a way for me to make the changes I need to make within VS10 without upgrading the project (including compiling, using the debugger, etc.), or do I need to re-install VS 2008?

    Read the article

  • Dark Visual Experience in Visual Studio 2012

    - by Jalpesh P. Vadgama
    I have written whole series related to Visual Studio 2012 features and this post will also be part of same series.You can get all my post related to visual studio from the following link. Visual Studio 2012 feature series Before some days I was searching something and found a great way to change the visual experience of visual studio 2012. I found that there are two type of themes available in visual studio 2012 light and dark under Tools->Option-> General environment value. This is one of newest feature I have found in visual studio 2012. Read More >>

    Read the article

  • Editing source from a Visual Studio 9 solution in Visual Studio 2010

    - by fatcat1111
    I work in a large team, and not everybody has upgraded from VS 2008 to VS 2010, though I have. I have a maintenance bug in a VS 2008 project, and have been told that I cannot upgrade the project file. Is there a way for me to make the changes I need to make within VS10 without upgrading the project (including compiling, using the debugger, etc.), or do I need to re-install VS 2008?

    Read the article

  • Determine when using the VC90 compiler in VS2010 instead of VS2008?

    - by Dan
    Is there a (Microsoft-specific) CPP macro to determine when I'm using the VC9 compiler in Visual Studio 2010 as opposed to Visual Studio 2008? _MSC_VER returns the compiler version, so with VS2010 multi-targeting feature, I'll get the same result as with VS2008. The reason for wanting to know the difference is that I created a new VS2010 project which contains code removed from a larger project. I just left the VS2008 stuff "as is" since we're moving away from VS2008 "soon" anyway and I didn't want to go through the hassle of creating a vcproj file along with the new vcxproj. For now, I've just defined my own macro to indicate whether the code is compiled into its own DLL or not; it works just fine, but it would be nice if there were something slightly more elegant.

    Read the article

  • Cannot add SourceSafe Database as Visual Studio 2010 source control.

    - by CletusLoomis
    My issue is that I cannot add SourceSafe Database for source control within Visual Studio 2010. Our team was initially using VSS for source control in Visual Studio 2010. During an evaluation of TFS, I switched my source control to TFS. It will be a few weeks before a decision is made on TFS, so I needed to switch my source control back to VSS. However I'm now unable to add a SourceSafe Database in Visual Studio. Steps to Reproduce in Visual Studio 2010: 1) Access the 'Open SourceSafe Database' form via Tools-Options-Source Control-Plug-in Settings--Advanced or via File-Source Control 2) The list of available database is blank so I choose 'Browse'. 3) I browse to the srcsafe.ini file for my VSS database and select it. 4) I'm promted to confirm the Database Name - Click OK. 5) The database does not appear in the 'Open SourceSafe' Database form. The list of available databases is still blank. Note that I can add the database fine outside of Visual Studio using VSS directly. However the databases I add via VSS do not appear in the Visual Studio forms. I'm suspicious that this is related to "down-grading" from TFS to VSS which may not have been heavily tested at MS. Any assistance is appreciated.

    Read the article

  • Visual Studio 2010 Extension Manager (and the new VS 2010 PowerCommands Extension)

    - by ScottGu
    This is the twenty-third in a series of blog posts I’m doing on the VS 2010 and .NET 4 release. Today’s blog post covers some of the extensibility improvements made in VS 2010 – as well as a cool new "PowerCommands for Visual Studio 2010” extension that Microsoft just released (and which can be downloaded and used for free). [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] Extensibility in VS 2010 VS 2010 provides a much richer extensibility model than previous releases.  Anyone can build extensions that add, customize, and light-up the Visual Studio 2010 IDE, Code Editors, Project System and associated Designers. VS 2010 Extensions can be created using the new MEF (Managed Extensibility Framework) which is built-into .NET 4.  You can learn more about how to create VS 2010 extensions from this this blog post from the Visual Studio Team Blog. VS 2010 Extension Manager Developers building extensions can distribute them on their own (via their own web-sites or by selling them).  Visual Studio 2010 also now includes a built-in “Extension Manager” within the IDE that makes it much easier for developers to find, download, and enable extensions online.  You can launch the “Extension Manager” by selecting the Tools->Extension Manager menu option: This loads an “Extension Manager” dialog which accesses an “online gallery” at Microsoft, and then populates a list of available extensions that you can optionally download and enable within your copy of Visual Studio: There are already hundreds of cool extensions populated within the online gallery.  You can browse them by category (use the tree-view on the top-left to filter them).  Clicking “download” on any of the extensions will download, install, and enable it. PowerCommands for Visual Studio 2010 This weekend Microsoft released the free PowerCommands for Visual Studio 2010 extension to the online gallery.  You can learn more about it here, and download and install it via the “Extension Manager” above (search for PowerCommands to find it). The PowerCommands download adds dozens of useful commands to Visual Studio 2010.  Below is a screen-shot of just a few of the useful commands that it adds to the Solution Explorer context menus: Below is a list of all the commands included with this weekend’s PowerCommands for Visual Studio 2010 release: Enable/Disable PowerCommands in Options dialog This feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable. Note: All power commands are initially defaulted Enabled. Format document on save / Remove and Sort Usings on save The Format document on save option formats the tabs, spaces, and so on of the document being saved. It is equivalent to pointing to the Edit menu, clicking Advanced, and then clicking Format Document. The Remove and sort usings option removes unused using statements and sorts the remaining using statements in the document being saved. Note: The Remove and sort usings option is only available for C# documents. Format document on save and Remove and sort usings both are initially defaulted OFF. Clear All Panes This command clears all output panes. It can be executed from the button on the toolbar of the Output window. Copy Path This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer: The solution node; A project node; Any project item node; Any folder. Email CodeSnippet To email the lines of text you select in the code editor, right-click anywhere in the editor and then click Email CodeSnippet. Insert Guid Attribute This command adds a Guid attribute to a selected class. From the code editor, right-click anywhere within the class definition, then click Insert Guid Attribute. Show All Files This command shows the hidden files in all projects displayed in the Solution Explorer when the solution node is selected. It enhances the Show All Files button, which normally shows only the hidden files in the selected project node. Undo Close This command reopens a closed document , returning the cursor to its last position. To reopen the most recently closed document, point to the Edit menu, then click Undo Close. Alternately, you can use the CtrlShiftZ shortcut. To reopen any other recently closed document, point to the View menu, click Other Windows, and then click Undo Close Window. The Undo Close window appears, typically next to the Output window. Double-click any document in the list to reopen it. Collapse Projects This command collapses a project or projects in the Solution Explorer starting from the root selected node. Collapsing a project can increase the readability of the solution. This command can be executed from three different places: solution, solution folders and project nodes respectively. Copy Class This command copies a selected class entire content to the clipboard, renaming the class. This command is normally followed by a Paste Class command, which renames the class to avoid a compilation error. It can be executed from a single project item or a project item with dependent sub items. Paste Class This command pastes a class entire content from the clipboard, renaming the class to avoid a compilation error. This command is normally preceded by a Copy Class command. It can be executed from a project or folder node. Copy References This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes. Paste References This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node. Copy As Project Reference This command copies a project as a project reference to the clipboard. It can be executed from a project node. Edit Project File This command opens the MSBuild project file for a selected project inside Visual Studio. It combines the existing Unload Project and Edit Project commands. Open Containing Folder This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node Open Command Prompt This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively. Unload Projects This command unloads all projects in a solution. This can be useful in MSBuild scenarios when multiple projects are being edited. This command can be executed from the solution node. Reload Projects This command reloads all unloaded projects in a solution. It can be executed from the solution node. Remove and Sort Usings This command removes and sort using statements for all classes given a project. It is useful, for example, in removing or organizing the using statements generated by a wizard. This command can be executed from a solution node or a single project node. Extract Constant This command creates a constant definition statement for a selected text. Extracting a constant effectively names a literal value, which can improve readability. This command can be executed from the code editor by right-clicking selected text. Clear Recent File List This command clears the Visual Studio recent file list. The Clear Recent File List command brings up a Clear File dialog which allows any or all recent files to be selected. Clear Recent Project List This command clears the Visual Studio recent project list. The Clear Recent Project List command brings up a Clear File dialog which allows any or all recent projects to be selected. Transform Templates This command executes a custom tool with associated text templates items. It can be executed from a DSL project node or a DSL folder node. Close All This command closes all documents. It can be executed from a document tab. How to temporarily disable extensions Extensions provide a great way to make Visual Studio even more powerful, and can help improve your overall productivity.  One thing to keep in mind, though, is that extensions run within the Visual Studio process (DevEnv.exe) and so a bug within an extension can impact both the stability and performance of Visual Studio.  If you ever run into a situation where things seem slower than they should, or if you crash repeatedly, please temporarily disable any installed extensions and see if that fixes the problem.  You can do this for extensions that were installed via the online gallery by re-running the extension manager (using the Tools->Extension Manager menu option) and by selecting the “Installed Extensions” node on the top-left of the dialog – and then by clicking “Disable” on any of the extensions within your installed list: Hope this helps, Scott

    Read the article

  • installing visual studio 2005 after 2008 already installed

    - by Mike
    I have a machine with VS 2008/Sql 2008 already installed. I now need to install an instance of vs 2005/Sql 2005 for two reasons. The main reason is for reporting Services 2005. All of the report servers are sql 2005. Now to create a SSRS compatible with 2005 do I just need to install Sql Server 2005 and work with it in VS 2008 or do I also need to install VS 2005. The second reason is the off-site team that I am consulting with do not want the project upgraded yet. So without rebuilding the whole box is there a safe way to install VS 2005 on a box that already contains 2008? Same question for Sql Server 2005? Thanks

    Read the article

  • Visual Studio Missing Warnings

    - by coffeeaddict
    Anyone find where when you open a certain solution (that contains multiple projects) and compile that you're not seen some warnings that your collegues see when compiling the exact same solution at the exact same state? The code is the same. I depend highly on the warnings as a shortcut to find unused methods, etc. But I get nothing during compile.. only a couple based on references to user controls, etc.

    Read the article

  • Visual Studio 2008 marks solution files as version 10.00

    - by bja
    Hi After trying out VS2010b2 also my VS2008 installation changes the versions of solution and project files to "Version 10.00". The MSBuild.exe on our CI Server does not support them. Is there a way to make VS2008 generate sln files with version number 9.00 again? I know, i can fix that manually. But each time I open a solution, the version gets changed back, which is annoying. Cheers, bja

    Read the article

  • Hotkeys no longer work in Visual C# 2010 Express

    - by Sir Graystar
    Suddenly none of hotkeys in C# Express work (like F5, F6 etc.). I don't know what I've done, but no doubt its something stupid. Does anyone know how to fixed this? I have tried the Keyboard settings in Options, but it won;t even let me add hotkeys for some reason, even once I've removed the old ones. So re-adding them does not work.

    Read the article

  • T4 Template error - Assembly Directive cannot locate referenced assembly in Visual Studio 2010 proje

    - by CodeSniper
    I ran into the following error recently in Visual Studio 2010 while trying to port Phil Haack’s excellent T4CSS template which was originally built for Visual Studio 2008.   The Problem Error Compiling transformation: Metadata file 'dotless.Core' could not be found In “T4 speak”, this simply means that you have an Assembly directive in your T4 template but the T4 engine was not able to locate or load the referenced assembly. In the case of the T4CSS Template, this was a showstopper for making it work in Visual Studio 2010. On a side note: The T4CSS template is a sweet little wrapper to allow you to use DotLessCss to generate static .css files from .less files rather than using their default HttpHandler or command-line tool.    If you haven't tried DotLessCSS yet, go check it out now!  In short, it is a tool that allows you to templatize and program your CSS files so that you can use variables, expressions, and mixins within your CSS which enables rapid changes and a lot of developer-flexibility as you evolve your CSS and UI. Back to our regularly scheduled program… Anyhow, this post isn't about DotLessCss, its about the T4 Templates and the errors I ran into when converting them from Visual Studio 2008 to Visual Studio 2010. In VS2010, there were quite a few changes to the T4 Template Engine; most were excellent changes, but this one bit me with T4CSS: “Project assemblies are no longer used to resolve template assembly directives.” In VS2008, if you wanted to reference a custom assembly in your T4 Template (.tt file) you would simply right click on your project, choose Add Reference and select that assembly.  Afterwards you were allowed to use the following syntax in your T4 template to tell it to look at the local references: <#@ assembly name="dotless.Core.dll" #> This told the engine to look in the “usual place” for the assembly, which is your project references. However, this is exactly what they changed in VS2010.  They now basically sandbox the T4 Engine to keep your T4 assemblies separate from your project assemblies.  This can come in handy if you want to support different versions of an assembly referenced both by your T4 templates and your project. Who broke the build?  Oh, Microsoft Did! In our case, this change causes a problem since the templates are no longer compatible when upgrading to VS 2010 – thus its a breaking change.  So, how do we make this work in VS 2010? Luckily, Microsoft now offers several options for referencing assemblies from T4 Templates: GAC your assemblies and use Namespace Reference or Fully Qualified Type Name Use a hard-coded Fully Qualified UNC path Copy assembly to Visual Studio "Public Assemblies Folder" and use Namespace Reference or Fully Qualified Type Name.  Use or Define a Windows Environment Variable to build a Fully Qualified UNC path. Use a Visual Studio Macro to build a Fully Qualified UNC path. Option #1 & 2 were already supported in Visual Studio 2008, so if you want to keep your templates compatible with both Visual Studio versions, then you would have to adopt one of these approaches. Yakkety Yak, use the GAC! Option #1 requires an additional pre-build step to GAC the referenced assembly, which could be a pain.  But, if you go that route, then after you GAC, all you need is a simple type name or namespace reference such as: <#@ assembly name="dotless.Core" #> Hard Coding aint that hard! The other option of using hard-coded paths in Option #2 is pretty impractical in most situations since each developer would have to use the same local project folder paths, or modify this setting each time for their local machines as well as for production deployment.  However, if you want to go that route, simply use the following assembly directive style: <#@ assembly name="C:\Code\Lib\dotless.Core.dll" #> Lets go Public! Option #3, the Visual Studio Public Assemblies Folder, is the recommended place to put commonly used tools and libraries that are only needed for Visual Studio.  Think of it like a VS-only GAC.  This is likely the best place for something like dotLessCSS and is my preferred solution.  However, you will need to either use an installer or a pre-build action to copy the assembly to the right folder location.   Normally this is located at:  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies Once you have copied your assembly there, you use the type name or namespace syntax again: <#@ assembly name="dotless.Core" #> Save the Environment! Option #4, using a Windows Environment Variable, is interesting for enterprise use where you may have standard locations for files, but less useful for demo-code, frameworks, and products where you don't have control over the local system.  The syntax for including a environment variable in your assembly directive looks like the following, just as you would expect: <#@ assembly name="%mypath%\dotless.Core.dll" #> “mypath” is a Windows environment variable you setup that points to some fully qualified UNC path on your system.  In the right situation this can be a great solution such as one where you use a msi installer for deployment, or where you have a pre-existing environment variable you can re-use. OMG Macros! Finally, Option #5 is a very nice option if you want to keep your T4 template’s assembly reference local and relative to the project or solution without muddying-up your dev environment or GAC with extra deployments.  An example looks like this: <#@ assembly name="$(SolutionDir)lib\dotless.Core.dll" #> In this example, I’m using the “SolutionDir” VS macro so I can reference an assembly in a “/lib” folder at the root of the solution.   This is just one of the many macros you can use.  If you are familiar with creating Pre/Post-build Event scripts, you can use its dialog to look at all of the different VS macros available. This option gives the best solution for local assemblies without the hassle of extra installers or other setup before the build.   However, its still not compatible with Visual Studio 2008, so if you have a T4 Template you want to use with both, then you may have to create multiple .tt files, one for each IDE version, or require the developer to set a value in the .tt file manually.   I’m not sure if T4 Templates support any form of compiler switches like “#if (VS2010)”  statements, but it would definitely be nice in this case to switch between this option and one of the ones more compatible with VS 2008. Conclusion As you can see, we went from 3 options with Visual Studio 2008, to 5 options (plus one problem) with Visual Studio 2010.  As a whole, I think the changes are great, but the short-term growing pains during the migration may be annoying until we get used to our new found power. Hopefully this all made sense and was helpful to you.  If nothing else, I’ll just use it as a reference the next time I need to port a T4 template to Visual Studio 2010.  Happy T4 templating, and “May the fourth be with you!”

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >