<?xml version='1.0' encoding='UTF-8'?><rss version="2.0"><channel><title>Questions tagged 'visualstudio' - Stack Overflow</title><link>http://stackoverflow.com/feeds/tag/visualstudio</link><item><title>How to surround a code block with a using statement in ReSharper?</title><link>http://stackoverflow.com/questions/326387/how-to-surround-a-code-block-with-a-using-statement-in-resharper</link><description><![CDATA[<p>I'm watching Stephen A Bohlen's excellent <a href="http://www.summerofnhibernate.com/" rel="nofollow">Summer of NHibernate</a> series, and have been watching him interact with CodeRush.  I've recently installed ReSharper (I'm a ReSharper newbie), and I'm trying to find some of the ReSharper productivity equivalents that Stephen is demonstrating (tangentially) with CodeRush.</p>

<p>As an example, he demonstrates highlighting a code block that looks like this:</p>

<pre><code>ISession session = GetSession();
session.xxx
</code></pre>

<p>and then turning it into </p>

<pre><code>using (ISession session = GetSession())
{
   session.xxx
}
</code></pre>

<p>He does this by highlighting the block he wants to <em>surround</em> with the using statement and then invoking some CodeRush template.  I've been unable to figure out how to do the equivalent thing with ReSharper.  I found the ReSharper Surround command (within the Code command), but when you select the <strong>using</strong> statement, it does surround your highlighted code block, but it does not seem <em>smart</em> enough to put the first line within the using clause.  That is, it results in:</p>

<pre><code>using () 
{
  ISession session = GetSession();
  session.xxx
}
</code></pre>

<p>which requires me to move the first line into the using clause.  Am I missing an easier way?</p>]]></description></item><item><title>Mylyn type plugin for Visual Studio</title><link>http://stackoverflow.com/questions/221809/mylyn-type-plugin-for-visual-studio</link><description><![CDATA[<p><a href="http://www.eclipse.org/mylyn/" rel="nofollow">Mylyn</a> is a task oriented plugin that allows for example to assign a set of files to a task. Is there a Mylyn type plugin for Visual Studio?</p>]]></description></item><item><title>Multi-lingual projects in Visual Studio</title><link>http://stackoverflow.com/questions/315230/multi-lingual-projects-in-visual-studio</link><description><![CDATA[<p>Would anyone know if there are plans or extensions to Visual Studio to allow for multi-lingual projects?</p>

<p>While the .NET platform is truly polyglot, Visual Studio project are stubbornly monoglot which means that all the work that goes into tooling C# and VB is unusable from newer languages like F# and IronPython.</p>

<p>PEX is an example of a great extension to Visual Studio that simply doesn't work in F#.</p>

<p>Wasn't there a module system built into .NET specifically to enable ployglot compilation?</p>

<p>regards,</p>

<p>Danny</p>]]></description></item><item><title>Visual Studio Tips on getting headers that are used in a given project?</title><link>http://stackoverflow.com/questions/325197/visual-studio-tips-on-getting-headers-that-are-used-in-a-given-project</link><description><![CDATA[<p>I have added all the header files from library in path how to get the headers that are only needed for the project</p>]]></description></item><item><title>How to deploy multiple projects in a single MSI?</title><link>http://stackoverflow.com/questions/295138/how-to-deploy-multiple-projects-in-a-single-msi</link><description><![CDATA[<p>I have 3 projects in my solution that I want to deploy. Is there a nice and quick way of using Visual Studio's setup projects to deploy all three apps using one MSI and letting the user decide which apps he wants to install during the install process? </p>

<p>I have setup projects for the 3 individual apps, I also have an overarching setup project that has the output of those other three projects. Am I on the right track or is there a better way?</p>]]></description></item><item><title>What is &amp;quot;missing&amp;quot; in the Visual Studio Express Editions?</title><link>http://stackoverflow.com/questions/86562/what-is-missing-in-the-visual-studio-express-editions</link><description><![CDATA[<p>In particular,</p>

<ul>
<li>what functionality is not available?</li>
<li>what restrictions are there on its use?</li>
</ul>]]></description></item><item><title>Visual Studio C#-settings and StyleCop (MS Source Analysis)</title><link>http://stackoverflow.com/questions/325330/visual-studio-c-settings-and-stylecop-ms-source-analysis</link><description><![CDATA[<p>Does anyone have settings for Visual Studio, in XML or a .vssettings-file, that is compatible with <a href="http://code.msdn.microsoft.com/sourceanalysis" rel="nofollow">StyleCop</a>?</p>

<p>I've used the book <a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321545613/" rel="nofollow">Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries</a> for guidance on what Microsoft finds to be the correct way to format C# and set my Visual Studio-settings accordingly.</p>

<p>But when I use "Format Document" in Visual Studio, StyleCop will fire on all cylinders and complains on all sorts of things.</p>

<p>Some errors even seems impossible to set in the settings. Like curly braces should be on a new line, if something spans for more than one row.</p>]]></description></item><item><title>Visual Studio 2008 Installer Project - Custom Actions not firing</title><link>http://stackoverflow.com/questions/321867/visual-studio-2008-installer-project-custom-actions-not-firing</link><description><![CDATA[<p>I can't seem to get a custom action working.  I might be doing this wrong.  Here's what I'm trying to do:</p>

<p>I'd like to run a custom action in my application install (Visual Studio Installer project) that runs an executable.  The executable simply does some system.io filecopy tasks, and I've confirmed that the executable when ran by itself works perfectly.</p>

<ol>
<li>I created the installer project</li>
<li>added the exe to the application folder</li>
<li>went to custom actions and added the exe to the Commit step</li>
<li>InstallerClass is set to true</li>
<li>Ran the installer, didn't get the result I was hoping for.  So I added a line to write to the windows log.  Looked in the Windows log after running the installer again and it looked like it didn't run.  Added a debug.break to the exe code Unisntalled/reinstalled my installer and nothing happened.  I finally sat and watched the processes and confirmed the exe never gets executed.  </li>
</ol>

<p>Any thoughts?</p>

<p>Targeted Systems: Windows XP, Vista
Visual Studio Version: 2008 Sp1
Language: VB.NET
Targeted Framework: 2.0</p>]]></description></item><item><title>Can I create transparent buttons in Visual Studio 2005 with C#</title><link>http://stackoverflow.com/questions/201778/can-i-create-transparent-buttons-in-visual-studio-2005-with-c</link><description><![CDATA[<p>I have a user interface that requires placing some round buttons in a C# project with some data behind them. The buttons are System.Windows.Forms.buttons and I have used a GIF image with transparency to create them.  However, the transparent areas aren't transparent.  I've looked for references online but haven't found any suggestions for how to do this properly.  There's some mention of doing it in Visual Studio 2008 but I need to keep this project in 2005. Any help or suggestion is appreciated.</p>]]></description></item><item><title>Can several suites of the same version of Visual Studio be installed Side by Side ?</title><link>http://stackoverflow.com/questions/233123/can-several-suites-of-the-same-version-of-visual-studio-be-installed-side-by-si</link><description><![CDATA[<p>Hi,</p>

<p>I would like to know if I can install say Visual Studio 2008 Pro and Visual Studio 2008 standard on the same machine. I have tried to install the pro (trial edition available on MSDN) after the express, and it seems to require them to be installed in the same directory. Is this specific to the express edition ?</p>

<p>The reason why I am asking this is to support automatic detection of VS compilers on a given machine for a build tool (scons), and I am not so familiar with non express versions of VS. IOW, I don't want to run them side by side, I only need to know if I should handle side by side installation in my detection scheme.</p>]]></description></item><item><title>View multiple files in Visual Studio</title><link>http://stackoverflow.com/questions/279861/view-multiple-files-in-visual-studio</link><description><![CDATA[<p>I just realised that Office 2007 now shows multiple pages per default. I can finally take advantage of that huge monitor I've bought. </p>

<p>Is there a similar feature with Visual Studio?</p>

<p>Something like "View -> Two Pages"</p>]]></description></item><item><title>Post build visual studio step not being called at all</title><link>http://stackoverflow.com/questions/288735/post-build-visual-studio-step-not-being-called-at-all</link><description><![CDATA[<p>The long of it is I built an installer in visual studio that gave me this cheery error when I tried to use the program: </p>

<blockquote>
  <p>Retrieving the COM class factory for
  component with CLSID
  {EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}
  failed due to the following error:
  80040154.</p>
</blockquote>

<p>From that it seems I need to embed the manifest in the executable and to do that I should add as a post build event the following: </p>

<blockquote>
  <p>"$(DevEnvDir)....VCinmt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest"
  –outputresource:"$(TargetDir)$(TargetFileName)";#1</p>
</blockquote>

<p>Well, when I do that and build the solution the event is not being called at all. In fact, I can put any old random text in the pre and post events and no error is ever given nor do I see anything being called.</p>

<p>Is there something that I should be doing differently to make this work?</p>

<p>Additional information:</p>

<p>I'm building from the IDE. And when I toggle the build types to debug and release I still the correct command in the post build events.</p>

<p>Is there a way to see a log of what it's doing?</p>]]></description></item><item><title>Uninstall Windows Service from Deployment package</title><link>http://stackoverflow.com/questions/289796/uninstall-windows-service-from-deployment-package</link><description><![CDATA[<p>Hi,</p>

<p>I know that you can install your Windows Service via the VS deployment system which I've done.  But how do you deploy updates after that? Each time I deploy a new version, it says that the service already exists and exits.</p>

<p>I tried to add a little DOS CMD file with the following:
net stop [ServiceName]
sc delete [ServiceName]</p>

<p>It would work fine if I could just get to run it, but the custom scripts options in the Deployment system doesn't allow that file type.</p>

<p>How can I either a). Update my package on the clients pc or b). run that uninstall utility from within my installer so I can run the update?</p>

<p>Any help would be greatly appreciated.</p>

<p>Regards,</p>

<p>Storm</p>]]></description></item><item><title>C++ Visual Studio Runtime Error</title><link>http://stackoverflow.com/questions/301655/c-visual-studio-runtime-error</link><description><![CDATA[<p>Can anyone explain to me what this means?</p>

<p>"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."</p>]]></description></item><item><title>Post Build Events Customization In Visual Studio</title><link>http://stackoverflow.com/questions/301765/post-build-events-customization-in-visual-studio</link><description><![CDATA[<p>Hi 
Is there a way to customize the post build event macros, I would like to move the new assembly to a sub folder in the same directory named by the version of the assembly ie</p>

<p>copy $(TargetDir)$(TargetFileName) $(TargetDir)$(<strong>ASSEMBLYVERSION</strong>)$(TargetFileName)</p>

<p>However there is no such 'macro'.
Sort of building a executable to get version like so</p>

<pre><code>call foo.bat $(TargetName)
</code></pre>

<p>Where we have foo.bat evaluate the version of the target by calling a managed app that prints the version of the assembly you pass in, say GetVersion.exe</p>

<pre><code>for /f %%t in ('GetVersion.exe %1') do (
        set _version=%%t
    )
echo %_version%
</code></pre>

<p>Any Ideas?? surely there is a way to customize the macros directly??</p>]]></description></item><item><title>How to stop visual studio from going to program.cs on (Break All) the pause button.</title><link>http://stackoverflow.com/questions/308988/how-to-stop-visual-studio-from-going-to-programcs-on-break-all-the-pause-button</link><description><![CDATA[<p>It is really annoying.</p>

<pre><code>Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new mainForm()); &lt;-- pausing visual studio breaks here.
</code></pre>

<p>Thanks guys.</p>]]></description></item><item><title>UAC/VS/W2K8: Why does VS not launch with admin privleges when I am in the Administrators group?</title><link>http://stackoverflow.com/questions/318163/uacvsw2k8-why-does-vs-not-launch-with-admin-privleges-when-i-am-in-the-administ</link><description><![CDATA[<p>Server 2008 machine with SP1, Visual Studio 2008 with SP1. My user; Developer, is in the local Administrators group. That said, some actions I perform in Visual Studio (use the properties window of a web application to invoke the creation of a virtual directory in local IIS) tell me that Admin privileges are required. It is an annoyance more than anything, I can just launch VS with right click (Run As Administrator) to perform the action -  but I was curious if anyone knows why this happens?</p>]]></description></item><item><title>Can I find out the return value before returning while debugging in Visual Studio</title><link>http://stackoverflow.com/questions/268048/can-i-find-out-the-return-value-before-returning-while-debugging-in-visual-stud</link><description><![CDATA[<p>Take the following function:</p>

<pre><code>DataTable go()
{
  return someTableAdapter.getSomeData();
}
</code></pre>

<p>When I set a breakpoint in this function, is there a possibility to inspect the returned value? The "go" function is directly coupled to a datagrid in an aspx page.</p>

<p>The only way to inspect the returned datatable, is to use a temporary variable... However, that's a bit inconvenient. Isn't there another way?</p>]]></description></item><item><title>Apply style reference at runtime in Mobile web application</title><link>http://stackoverflow.com/questions/316803/apply-style-reference-at-runtime-in-mobile-web-application</link><description><![CDATA[<p>Hi All,</p>

<p>I'm new to mobile web development. I'm creting a website for mobiles in ASP.NET 2.0. I want to apply different style reference to the Objectlist control data according to the prfit/loss (Green if profit and red if loss)
at runtime. Please help.</p>

<p>Thanks &amp; Regards</p>

<p>Khushi</p>]]></description></item><item><title>How do I set the icon for my application in visual studio 2008?</title><link>http://stackoverflow.com/questions/320677/how-do-i-set-the-icon-for-my-application-in-visual-studio-2008</link><description><![CDATA[<p>How do I set the executable icon for my C++ application in visual studio 2008?</p>]]></description></item><item><title>What could cause Visual Studio / C# error MSB3105: Duplicate resources</title><link>http://stackoverflow.com/questions/313718/what-could-cause-visual-studio-c-error-msb3105-duplicate-resources</link><description><![CDATA[<p>While working on an existing project I suddenly got the following error when trying to compile the solution:</p>

<p><em>error MSB3105: The item "[filename]" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.</em></p>

<p>Now, as far as I'm aware, I did not make any change to the project that affects the resources. Also I have checked each and every file within the project, but there is no duplicate reference anywhere to this file. 
Now I already found some forum entries regarding this error:</p>

<p>1) Open the .csproj file and remove the duplicate reference. [Tries this, but I cannot find any duplicates in it]</p>

<p>2) In a 'partial class' project, move everything to a single class. [ Could try this, but the project has been split up into partial classes since the start, and I do not want to change this just because of the error ]</p>

<p>So what else could cause this ?</p>]]></description></item><item><title>What do you use to develop for PowerShell?</title><link>http://stackoverflow.com/questions/245043/what-do-you-use-to-develop-for-powershell</link><description><![CDATA[<p>I don't see a Visual Studio plugin for it (although I didn't look that hard, so I might have missed it), and searches turn up random third-party solutions, but is there something that comes with PowerShell or something that plugs into Visual Studio?</p>]]></description></item><item><title>VS2008 debugging with firefox as default browser - how to make the debugger stop/close on exit?</title><link>http://stackoverflow.com/questions/321568/vs2008-debugging-with-firefox-as-default-browser-how-to-make-the-debugger-stopc</link><description><![CDATA[<p>I have Firefox as my default browser on my dev machine and when I start debugging from visual studio Firefox launches as I would expect and all the attributes of the experience are the same as IE except for one thing - when I close the browser. When using IE, when I close the browser visual studio will automatically shut down the debugger. When I close FF I do not get this behavior - does anyone know how to make this happen?</p>]]></description></item><item><title>Can I set the process title for IIS6's w3wp.exe?</title><link>http://stackoverflow.com/questions/324435/can-i-set-the-process-title-for-iis6s-w3wpexe</link><description><![CDATA[<p>In Visual Studio's "Attach to Process" dialog I can see a Title column for each of the processes available. Is there any way for me to set the title for a specific w3wp.exe process to reflect the application pool it's hosting?</p>

<p>PS - I'm aware of iisapp.vbs and the way it enables me to identify which w3wp.exe belongs to which application pool. I'm aiming for a more user-friendly solution here :)</p>

<p>PPS - Currently running IIS6.</p>]]></description></item><item><title>.NET Regular Expressions in Infinite Cycle</title><link>http://stackoverflow.com/questions/323973/net-regular-expressions-in-infinite-cycle</link><description><![CDATA[<p>I'm using .NET Regular Expressions to strip HTML code.</p>

<p>Using something like:</p>

<pre><code>&lt;title&gt;(?&lt;Title&gt;[wW]+?)&lt;/title&gt;[wW]+?&lt;div class="article"&gt;(?&lt;Text&gt;[wW]+?)&lt;/div&gt;
</code></pre>

<p>This works for 99% of the time, but sometimes, when parsing...</p>

<pre><code>Regex.IsMatch(HTML, Pattern)
</code></pre>

<p>The parser just blocks and it will continue on this line of code for several minutes or indefinitely.</p>

<p>What's going on?</p>]]></description></item><item><title>How can I see my applications threads while debugging in Visual Studio?</title><link>http://stackoverflow.com/questions/164600/how-can-i-see-my-applications-threads-while-debugging-in-visual-studio</link><description><![CDATA[<p>I would like to see the threads currently active in my application while debugging it.</p>

<p>How can I do this using Visual Studio?</p>]]></description></item><item><title>Project references in Visual Studio 2003 don't update automatically</title><link>http://stackoverflow.com/questions/324122/project-references-in-visual-studio-2003-dont-update-automatically</link><description><![CDATA[<p>Hi,</p>

<p>I have a VS 2003 Solution with several C# and VB.Net projects. One of the project has project references to the other projects. </p>

<p>However, when I change the signature of a method in one of the referenced projects and update the method call in the referencing project accordingly, I get a compile error, because the referencing projects still expects the old method signature.</p>

<p>I have to close and re-open Visual Studio. Then the compile error is gone until I change the build configuration from Debug to Release (or vice versa) and I have to re-load the solution again.</p>

<p>I this a known problem or is there a workaround that updates internal project references automatically? </p>

<p>Regards, divo</p>

<p>Edit (to answer the questions below):</p>

<p>There  are only <em>Project</em> references used in the solution, no direct file references. Also rebuilding the single projects separately does not solve the problem.</p>]]></description></item><item><title>ReSharper sluggishness</title><link>http://stackoverflow.com/questions/84009/resharper-sluggishness</link><description><![CDATA[<p>I like ReSharper, but it is a total memory hog. It can quickly swell up and consume a half-gig of RAM without too much effort and bog down the IDE. Does anybody know of any way to configure it to be not as slow?</p>]]></description></item><item><title>Any have a Visual Studio shortcut/macro for toggling break on handled/unhandled exceptions?</title><link>http://stackoverflow.com/questions/323390/any-have-a-visual-studio-shortcutmacro-for-toggling-break-on-handledunhandled-e</link><description><![CDATA[<p>I've been trying to write a macro do do the equivalent of </p>

<ol>
<li>Hitting Ctrl+Alt+E to bring up the Exceptions window</li>
<li>Toggling the textbox in the 'thrown' column for 'Common Language Runtime Exceptions'</li>
<li>Hitting OK</li>
</ol>

<p>If I record this, it records only a single line of macro code which doesn't do anything. Anyone know how to do this?</p>]]></description></item><item><title>How do I debug Javascript in Visual Studio 2005?</title><link>http://stackoverflow.com/questions/8398/how-do-i-debug-javascript-in-visual-studio-2005</link><description><![CDATA[<p>I just saw this mentioned in this <a href="http://beta.stackoverflow.com/questions/7975/best-css-editor" rel="nofollow">thread</a> and didn't know it could be done.  I'm a VS newbie, so how do you do it?  Is there a separate debugger for Javascript?  I know how to work the one for code-behind pages...  I usually use Firebug to deal with debugging JS.</p>

<p>EDIT: I'm using VS 2005.</p>]]></description></item></channel></rss>
