hi list,
i have an c# project, which contains some additional classes (nunit
testclasses), which are not needed in a release build? is it possible to
exclude them in the release build process?
i dont want to put the nunit tests in another project, because then i
have to switch the access modifiers from internal to public for the
classes i want to test.
thanks,
marco 6 3458
Marco Zapletal wrote: hi list,
i have an c# project, which contains some additional classes (nunit testclasses), which are not needed in a release build? is it possible to exclude them in the release build process?
<snip>
You could wrap the entire class in the file in a #if DEBUG clause. The
files would still be compiled but they would not contribute anything to
the final assembly.
--
Lasse Vågsæther Karlsen http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Marco Zapletal wrote: hi list,
i have an c# project, which contains some additional classes (nunit testclasses), which are not needed in a release build? is it possible to exclude them in the release build process?
<snip>
You could wrap the entire class in the file in a #if DEBUG clause. The
files would still be compiled but they would not contribute anything to
the final assembly.
--
Lasse Vågsæther Karlsen http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:en*************@tk2msftngp13.phx.gbl... You could wrap the entire class in the file in a #if DEBUG clause. The files would still be compiled but they would not contribute anything to the final assembly.
I'd recommend wrapping in #if TEST instead, and creating 2 new
configurations, a release and a debug with tests enabled. In the two new
configurations, define TEST, and set everything else up as their none test
counterparts. The reason I suggest this is that there are some optimisations
in the release build that I have seen trip up a release but not a debug
build. It doesn't happen often, come to think of it I don't think I've seen
it happen since VS2003 was released, but since you're shipping a release
build, you should test it.
--
Regards,
Tim Haughton
Agitek http://agitek.co.uk http://blogitek.com/timhaughton
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:en*************@tk2msftngp13.phx.gbl... You could wrap the entire class in the file in a #if DEBUG clause. The files would still be compiled but they would not contribute anything to the final assembly.
I'd recommend wrapping in #if TEST instead, and creating 2 new
configurations, a release and a debug with tests enabled. In the two new
configurations, define TEST, and set everything else up as their none test
counterparts. The reason I suggest this is that there are some optimisations
in the release build that I have seen trip up a release but not a debug
build. It doesn't happen often, come to think of it I don't think I've seen
it happen since VS2003 was released, but since you're shipping a release
build, you should test it.
--
Regards,
Tim Haughton
Agitek http://agitek.co.uk http://blogitek.com/timhaughton
thank you both for your answers...
regards,
marco
Tim Haughton wrote: "Lasse V�gs�ther Karlsen" <la***@vkarlsen.no> wrote in message news:en*************@tk2msftngp13.phx.gbl...
You could wrap the entire class in the file in a #if DEBUG clause. The files would still be compiled but they would not contribute anything to the final assembly.
I'd recommend wrapping in #if TEST instead, and creating 2 new configurations, a release and a debug with tests enabled. In the two new configurations, define TEST, and set everything else up as their none test counterparts. The reason I suggest this is that there are some optimisations in the release build that I have seen trip up a release but not a debug build. It doesn't happen often, come to think of it I don't think I've seen it happen since VS2003 was released, but since you're shipping a release build, you should test it.
thank you both for your answers...
regards,
marco
Tim Haughton wrote: "Lasse V�gs�ther Karlsen" <la***@vkarlsen.no> wrote in message news:en*************@tk2msftngp13.phx.gbl...
You could wrap the entire class in the file in a #if DEBUG clause. The files would still be compiled but they would not contribute anything to the final assembly.
I'd recommend wrapping in #if TEST instead, and creating 2 new configurations, a release and a debug with tests enabled. In the two new configurations, define TEST, and set everything else up as their none test counterparts. The reason I suggest this is that there are some optimisations in the release build that I have seen trip up a release but not a debug build. It doesn't happen often, come to think of it I don't think I've seen it happen since VS2003 was released, but since you're shipping a release build, you should test it. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rajesh Abraham |
last post by:
I would like to Exclude MyApp.Exe.Config from my Setup
Package as I don't want it to get overwritten during
upgrade installation of my application.
If I remove app.config while building the...
|
by: Benne Smith |
last post by:
Hi,
I have three enviroments; a development, a testing and a production
enviroment. I'm making a big application (.exe), which uses alot of
different webservices.
I don't use the webservices...
|
by: Nevyn Twyll |
last post by:
I have a bunch of test case classes (.cs) files in my executable.
For security and bloat reasons, I don't want them to compile into a Release
executable - only into a Debug build.
How do I...
|
by: Finn J Johnsen |
last post by:
Hi
Dow do I get ndoc to ignore classes flagged with the
attribute?
Thanks,
Finn Johnsen
|
by: VijayKani |
last post by:
How to exclude files from a VS.Net project through code when they are built
(especially in VB.Net and Asp.Net and C#)
--
Thanks
|
by: Marco Zapletal |
last post by:
hi list,
i have an c# project, which contains some additional classes (nunit
testclasses), which are not needed in a release build? is it possible to
exclude them in the release build process?
...
|
by: Brad |
last post by:
I'm not one to rant or flame....so please excuse me while I do so for this
once. I've now spent a bit of time working with VS2005 beta 2 to see how it
functions for web development, especially how...
|
by: GM |
last post by:
Hello,
I am using NDoc version 1.3.1 (MSDN documenter) to generate class
documentation for my class libraries. I am using the <exclude/tag on
the classes that should not be documented. The...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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$) {
}
...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |