Geeks With Blogs

@jolson88
  • jolson88 You know, for supposedly being in the post-PC era, I'm seeing a lot of tweets about the new Mac in my Twitter feed. #fb about 477 days ago
  • jolson88 @Anyware I find the difference in perception fascinating (and frustrating). about 480 days ago
  • jolson88 @Anyware Agreed. I've often wondered whether apps like yours can do well in freemium. about 480 days ago
  • jolson88 @Anyware Curious, have you tried an ad-driven freemium approach? about 480 days ago
  • jolson88 @Anyware Thx for the write-up! You know, I've been curious how well the freemium model would work outside of games... about 480 days ago

News

Series

Add to Technorati Favorites


An Archived Managed World This blog has moved to http://www.managed-world.com/blog

[Crosspost from Managed World]

As I've mentioned in a previous article, I was annoyed with Visual Studio .NET 2002/2003 and the fact that you can't change the obj directory. I'm a stickler for keeping my src directory clean. My annoyance was due to the fact that you could _not_ change the directory the intermediate files for C# were saved to. Well, I'm pleased to announce that it appears it has now changed.

You can change the "BaseIntermediateOutputPath" value in your MSBuild file and that will change where the intermediate files are created. Thanks Microsoft :). I can now have the exact directory structure I want without it being dictated to me by Microsoft. It's about time :).

Thanks go to Day Dreamer who pointed this out to me as a comment to the earlier post linked to above.

Posted on Saturday, March 11, 2006 7:35 PM | Back to top


Comments on this post: Changing the obj directory in .NET 2.0

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
I find that if you override BaseIntermediateOutputPath in the proj files then rebuilds will fail when run inside the IDE if the default obj\debug folder does not exist. Of course the IDE does not write any file to the default obj folder, it just fails if they are not there. The really bad news is that the IDE will still create the obj folder when you reopen a project anyway...
If anyone knows how to make the IDE work properly then I would love to know about it..
Left by Young Methusaleh on Jul 26, 2006 4:30 PM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
Methusaleh, I have the same problem than you, the obj folder is always recreated when I reopen the project. Could you solve this problem ?

Thanks,
Eric
Left by EricP on Oct 31, 2006 7:05 AM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
You can add a BaseIntermediateOutputPath tag under each of the target platform property groups. <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<BaseIntermediateOutputPath>myLibrary\obj\Debug</BaseIntermediateOutputPath>

Visual studio csproj files are msbuild files and should take most of the msbuild options
Left by Pradeep Prabhakar on Aug 29, 2007 10:30 AM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
The really bad news is that the IDE will still create the obj folder when you reopen a project anyway. If anyone knows how to make the IDE work properly then I would love to know about it.
Left by Pradeep on Apr 23, 2009 11:42 PM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
Put this to the post-build script, to remove the obj folder.

REM This removes the unused annoying obj folder after build.
rd "$(ProjectDir)obj" /S /Q
Left by Antal Dominik on Sep 10, 2010 6:07 AM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
I also like to keep my directory clean! It really irks me when it becomes unorganized and sloppy. Thanks Antal Dominik for the post-build script!
Left by Batesville Tool & Die on Nov 03, 2010 2:31 AM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
You are right, I have the same problem.
Left by gusev on Nov 18, 2010 10:01 PM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
pradeep, have you found fix for the problem yet? I would also like to know how to get rid of auto folder creation in IDE
Left by game price comparison on Dec 09, 2010 10:33 AM

# re: Changing the obj directory in .NET 2.0
Requesting Gravatar...
Thank for this post, always fun to read you guys :D
Left by aspirateur autonome on Dec 29, 2010 6:19 AM

Your comment:
 (will show your gravatar)
 


Copyright © Jason Olson | Powered by: GeeksWithBlogs.net | Join free