473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to add a file to "clean solution" files

Hi,

My VB project (VS 2005) has a post-build event that runs a program that
creates an executable file in the target directory (that is, the same folder
that contains the normal build results). However, since VS (or, more
specifically, MSBuild) doesn't know about this new executable, it isn't
deleted when I select Build->Clean Solution. How do I tell my VB project
about this file so that it gets deleted when I "clean" the build results?

TIA - Bob
Jul 20 '07 #1
2 3429
Hello Bob,

According to your description, you need delete a special file when VS
cleans solution.
If this is the case, following code should be helpful. Please append it
into .vbproj file.

Delete the file before VS.
<Project>
..
<Target Name="BeforeClean">
<Delete Files="$(MSBuildProjectDirectory)\bin\Debug\test.t xt" />
</Target>
..
</Project>

Or delete the file after VS.
<Project>
..
<Target Name="AfterClean">
<Delete Files="$(MSBuildProjectDirectory)\bin\Debug\test.t xt" />
</Target>
</Project>

Hope this helps. Please try this method and let me know whether this is
what you need. I'm glad to assist you.
Have a great day.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 20 '07 #2
Hi Wen Yuan

Is it a good idea to edit the vbproj file? How does the IDE sort out its
content from my content?

- Bob

"WenYuan Wang [MSFT]" <v-******@online.microsoft.comwrote in message
news:Xh**************@TK2MSFTNGHUB02.phx.gbl...
Hello Bob,

According to your description, you need delete a special file when VS
cleans solution.
If this is the case, following code should be helpful. Please append it
into .vbproj file.

Delete the file before VS.
<Project>
.
<Target Name="BeforeClean">
<Delete Files="$(MSBuildProjectDirectory)\bin\Debug\test.t xt" />
</Target>
.
</Project>

Or delete the file after VS.
<Project>
.
<Target Name="AfterClean">
<Delete Files="$(MSBuildProjectDirectory)\bin\Debug\test.t xt" />
</Target>
</Project>

Hope this helps. Please try this method and let me know whether this is
what you need. I'm glad to assist you.
Have a great day.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nick Gilbert | last post by:
Hi, I'm not sure if I've broken my VS.NET installation or if there has always been a bug of some sort, but basically Find in Entire Solution (ctrl-shift-F) isn't finding strings in my solution's...
3
by: GreggTB | last post by:
I've been working on what appears to be a cursed ASP.NET project....so many things have gone wrong that Murphy would be proud. ;-) Anyway, I shut down the project in VS.NET at one point this...
0
by: Beemer Biker | last post by:
I didnt see any "save solution" in the VS8 files menu where I can save the project solution to a different directory. My program needs to be checked into our source control system (Accurev) and...
3
by: Nick Gilbert | last post by:
Hi, In my VS.NET 2005, if I choose Build Clean Solution, the BIN folder is not touched. Shouldn't it delete all the dll and pdb files in that folder first? Instead, I'm finding I have to do it...
8
by: Ulysse | last post by:
Hello, I need to clean the string like this : string = """ bonne mentalit&eacute; mec!:) \n <br>bon pour info moi je suis un serial posteur arceleur dictateur ^^* \n ...
25
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class...
9
by: William Manley | last post by:
Hello. I've been using the ConfigParser module, which is a great module, gets the job done, but when it creates INI files its hard to read them. Heres what I mean, currently, when written to, the...
3
by: jcor | last post by:
Hi, I'm trying the "make distclean" comand. but I allways get this error: if I use the "make clean" I get the same error. Can someone teach me to use this commands, please? Thanks a lot, ...
8
by: plenty900 | last post by:
Hello, I'm trying to build a large project, and I've found that when something doesn't compile properly, and I attempt to re-build it, Visual C++ Express doesn't make a new attempt. So then I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.