Visual Studio :: Conditional Compilation Into Variables?

Nov 23, 2010

I have multiple solution configurations defined (Debug, Release, Local, Test, Production etc). I would like to assign this Config into a c# variable.Something like:

string configName = #(Config);

Is there something like this? It has to come from the solution configuration. I know I could hard code the solution configurations into the c# configName variable using multiple if conditions but wondered if there is something like above.

View 1 Replies


Similar Messages:

Visual Studio :: Compilation With Visual Studio 2008?

Sep 3, 2010

Every time i make a code change using VS2008 , in order for it to take effect i have to delete the files in the

"C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files" directory and then hit F5 .

View 6 Replies

Visual Studio 2010 - Revert .NET Pre-compilation?

Feb 24, 2011

I have created a web site, and i'll publish it... I wanna know if anyone who get access to my FTP and download my pre-compiled website can "revert" the DLL compilation, and re-create my code behinds!

View 3 Replies

Is The Publish Option In Visual Studio Considered Pre-compilation For Web Applications

Mar 18, 2011

I'm having trouble understanding when the site is considered "pre-compiled". As I understand what I've read, if I use the Publish or Build Deployment Package options from within Visual Studio then it is pre-compiling, but if I just use something like xcopy, then it is not pre-compiled.

View 2 Replies

Visual Studio :: Dynamic Compilation Of Aspx - Files Stopped Working

Sep 29, 2010

I recently ran into some strange problems. Changes to files that are not code-behind (and not gets compiled to a DLL) should not require you to recompile the whole website, and this has never been I problem for me. These should actually get compiled dynamically when you first access the resource, e.g. the first time when browsing an updated aspx-page in the browser.

But yesterday, during development of a website, I noticed that even the smallest changes in html, javascript or anything in the .aspx-files doesn't get reflected when I save and reload the page in my browser. Rebuilding doesn't help either, actually I'll have to do a "Rebuild All" (in Visual Studio 2008) in order to see the changes. This applies to all aspx-files in my project.

I tried with minor changes on files in another web application project on the same server, and there it works as it should. Something must has happened to this particular application, but I cannot figure out what. Do you have any ideas on how to solve this?

View 2 Replies

Visual Studio - Dynamic Compilation Of Aspx-files Stopped Working?

Sep 29, 2010

I recently ran into some strange problems. Changes to files that are not code-behind (and not gets compiled to a DLL) should not require you to recompile the whole website, and this has never been I problem for me.These should actually get compiled dynamically when you first access the resource, e.g. the first time when browsing an updated aspx-page in the browser.

But yesterday, during development of a website, I noticed that even the smallest changes in html, javascript or anything in the .aspx-files doesn't get reflected when I save and reload the page in my browser.Rebuilding doesn't help either, actually I'll have to do a "Rebuild All" (in Visual Studio 2008) in order to see the changes. This applies to all aspx-files in my project.I tried with minor changes on files in another web application project on the same server, and there it works as it should. Something must has happened to this particular application, but I cannot figure out what.Do you have any ideas on how to solve this?

View 1 Replies

Visual Studio :: Random Compilation - Errors On Constructors Of A Couple Of Classes?

Jul 14, 2010

my solution in VS 2008, consisting of a dozen projects, does not compile because it gives me errors on constructors of a couple of classes, telling me that lacks the constructor that takes one parameter, which lacks the parameterless constructor, and so on.Actually I have all the correct constructors, and other times I compile without problems.I'm not understand why I have these random problems, that it is practically impossible to replicate.

View 2 Replies

C# - Visual Studio 2008 Compilation Works; Same Project Compiled In 2010 Doesn't?

Feb 1, 2011

Have a project that was created in Visual Studio 2008 and deployed to a 64-bit Windows 2003 server. This application references a 32-bit Interop.ActiveDs.dll. The applications were originally compiled for 'Any CPU', however, explicitly compiling as 'x86' doesn't solve the problem. The project targets the 3.5 framework.

The server is running IIS 6.0 in 64-bit mode. When we deploy the version compiled in Visual Studio 2008, the app runs perfectly fine; all pages show up. In retrospect, this is actually surprising.We migrated the application to Visual Studio 2010 (we did not change the targeted framework) and redeployed. Now we get a BadImageFormatException loading Interop.ActiveDs.dll. Which actually makes more sense than the 2008 version running.To solve the problem, we set Enable32bitAppOnWin64 to true and ran aspnet_regiis.exe -i from the 32-bit folder of the 2.0 framework (as per various instructions on the web). In IIS, web service extensions, there were two versions of ASP.NET 2.0, one for 32-bit and one for 64-bit. We prohibited the 64-bit version, restarted IIS, and launched the website.

What we expected: The app to run as 32-bit, load the interop, and display
What we got: "Service Unavailable"All other web pages that were previously working displayed the same message, as did the Visual Studio 2008 version.The support page here describes the problem exactly, but tells us to do exactly what we did to resolve the problem (enable 32-bit mode).We've rolled back to 64-bit mode in IIS and deployed the Visual Studio 2008 version for now, but we really need to figure out how to make this app run and load the interop (there are also 32-bit Oracle DLLs that are referenced)Two questions:Why does the Visual Studio 2008 version work at all??
How do we get the Visual Studio 2010

View 1 Replies

Using #if Debug Conditional Compilation Statement In Aspx Page

Mar 9, 2010

I am trying to do something like this in an aspx page:

<head runat="server">
<% #if DEBUG %>
<script src="jquery-1.3.2.js" type="text/javascript"></script>
<% #else %>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<% #endif %>
</head>

I get an error "Preprocessor directives must appear as the first non-whitespace character on a line". How can I do this?

View 1 Replies

How To View Session Variables In Visual Studio 2008 Debugger

Mar 30, 2010

Usually using Visual Studio's debugger is a breeze. Scanning through Locals quickly shows the values of variables, etc. However, I'm at a loss how to find out the values contained in session state variables? Can anyone give me a hand?Lets say I put a breakpoint right after:

Session("first_name") = "Rob Roy"

How do I view the value contained in Session("first_name") from locals?

View 2 Replies

Visual Studio :: Boolean Variables Set On A Web Control At Design Time?

Dec 15, 2010

I'm trying to extend a RequiredFieldValidator in an incredibly basic manner.All I want to do is add a property that is a boolean that can be set at design time through the Properties window of Visual Studio 2008.I can get the control to build and render at design time but as soon as I set the Boolean property the control breaks.There is no trouble at run-time with this control, only design time.Below is the code,the placement in VS and the error message:

1) The Code:

[Code]....

3) This is what the design surface shows after that change is made:

In case the image is missing or broken and to help the search engines, this is what it says:

"An unhandled exception has occurred. 'False' could not be set on property 'ShowValidatorSummaryLink'"

I'm sure I'm missing something or there is a serious bug here.I can't imagine that setting a simple property on the design surface would cause so much trouble.

View 1 Replies

Visual Studio :: Can Debug Multi Threading And Watch Local Variables Of Each Thread

Jan 26, 2010

how can we debug multi threading and watch local variables of each thread.

Thread windows does not show variable values.

View 1 Replies

Accessing Function Variables For Conditional Logic In VB Page With Repeater?

May 10, 2010

I have a code behind page with two functions that return two counts (iCount and iCount2). In my repeater table I can display the results of the functions just fine, but now I need to do some conditional logic based on the results of the functions, eg:If iCount =>3 AND iCount2 =>1 Then

View 6 Replies

Visual Studio :: Debug A Multi Thread Program To See Local Variables Of Each Thread Using 2008

Jan 27, 2010

How can we debbug a multi-thread program to see local variables of each thread using visual studio 2008.

View 1 Replies

Visual Studio :: How To Convert Whole Visual Studio 2008 Web Site Project To Visual Studio 2010

Aug 14, 2010

is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site project

my current project references

i have a very annoying iis problem

iis server stops working until app pool is recycled

i am hoping that new visual studio (net framework 4.0) may solve this very annoying unsolveable problem

View 2 Replies

Visual Studio :: Opening Visual Studio 2008 Project In Visual Studio 2010?

May 21, 2010

Anyone know if I can maintain a VS 2008 (.net 3.5) project by using the VS 2010 IDE ?

View 1 Replies

Visual Studio :: Visual Source Safe Plug In Control For Visual Studio 2005 IDE

Jan 28, 2010

where to find/download visual source safe plug in or visual source safe client for visual studio 2005 IDE?

I do not want to install visual source safe 2005 server.

View 1 Replies

Visual Studio :: Migration From Visual Studio 2003 To Visual Studio 2010?

Apr 15, 2010

Is it possible to migrate the application which is in visual studio 2003 to visual studio 2010. provide me details about how to migrate.

View 2 Replies

Visual Studio :: Migration From Visual Studio 2005 To Visual Studio 2010?

Jun 16, 2010

I have a site in production developed in 2005 and i am planning to migrate to Visual studio 2010. Is there an easy way to do it?

View 1 Replies

Visual Studio :: Visual Source Safe 2005 + Visual Studio 2010,?

Feb 28, 2011

I want to use a source control in VS2010, I know my best bet is TFS, but at the moment TFS(can't afford ). As i understand TFS is the new VSS_2005(can afford)Can VSS 2005 be use as a source control for VS 2010 solutions/projects?

View 2 Replies

'Add Config Transforms' And One Click Publish Option Not Working When Upgraded From Visual Studio 2005 To Visual Studio 2010

Jul 28, 2010

I just recently upgrade my asp.net web project from visual studio 2005 to visual studio 2010. The upgrade was successful with no problems however im missing some features with this project. The One Click Publish feature(which is greyed out) in the header area of Visual Studio 2010 and the Add Config Transforms feature which is no where to be seen when you right click on web.config. When i create a new web project straight from visual studio 2010, these options work fine.

View 1 Replies

Visual Studio :: After Having To Do A Devenv /resetuserdata To Get Visual Studio 2010 Beta 2 Back, AJAX Drag Panel?

Mar 9, 2010

Visual Studio 2010 Beta 2 locked up, and when I tried to restart it, it wouldn't load, so I did a devenv.exe /resetuserdata to get it going again. It reset everyhing in my options of the web app/ etc, and now some AJAX conrols don't work such as dragpanel. I assume that it is because something got reset that I haven't enabled again, but can't figure it out.

View 2 Replies

Visual Studio - What Is Best Option In Visual Studio 2010 To Sync Project Files Between Home & Work Computers

Feb 14, 2011

Im working on a website project with Visual Studio 2010 from 2 different computers (home & work).
In Dreamweaver Im used to FTP to upload/download files to/from a webserver to syncronice my files on the current computer Im working on.What is best option in Visual Studio 2010 to sync project files between home & work computers? I have seen there is a built in FTP, but seems only it can upload files, limited functionality?

View 1 Replies

Visual Studio :: Can Visual Studio 2008 Be All In One Tool To Integrate Source Code Continuously

Jan 20, 2010

can Visual Studio 2008 be All-In-One tool to integrate source code continuously from team members, build, unit test?

Having used Visual Studio Team Edition 2005, unit testing each method within VS itself. I strongly believe that it is feasible to add-on tools. Example ankhsvn tool to use SVN from Visual studio [URL]

In my investigating i have come across number of tools(shown below) to use with Visual Studio 2008 professional

Development tool:- Visual Studio 2008 professional using Subversion as source control tool. Continuous Integration:- Hudson or Cruise control Build tool:- NAnt Testing:- NUnit, Selinium As Visual Studio 2008 can be used for unit testing I think NUnit is out of consideration.

In the same way i would like to have any other tools/add-ons to Visual studio to implement continuous integration, building and unit testing. This process should be automated such a way source code between team members is continuously integrated, built and unit testing is done as configured.

Objective is to use few number of tools as add-on to Visual Studio or achieve most from Visual studio itself (example unit testing). Visual Studio should be all in one tool.

I am aware that Team Foundation Server best suits my requirement, but it is out of scope due to its cost.

View 3 Replies

Visual Studio :: Unrecognized Tag Prefix Or Device Filter Error In Visual Studio 2005?

Dec 13, 2010

I am building master page in visual studio 2005 and I have placed contentplaceholder into between <head> and </head> tag of master page, but in source view of visual studio 2005, I am getting error that says "unrecognized tag prefix or device filter" how do i get rid of this error or is this bug in visual studio 2005

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved