|
Hi Guys,
I've got two config files for a winforms app:
app.release.config
app.debug.config
I copy these into the appropriate folders using the following post build event:
if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(TargetPath).config"
if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(TargetDir)$(TargetName).vshost.exe.config"
if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(TargetPath).config"
if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(TargetDir)$(TargetName).vshost.exe.config"
This works if i only build the project, but if i run the project as well, then the files are replaced by the origional app.config.
If i change it to overwrite the app.config file (Either pre / post build):
if $(ConfigurationName) == Debug copy "$(ProjectDir)app.debug.config" "$(ProjectDir)app.config"
if $(ConfigurationName) == Release copy "$(ProjectDir)app.release.config" "$(ProjectDir)app.config"
Then it overwrites the app.config file fine, but doesn't actually copy it to the output directory.
Any thoughts? This should be a common problem that's got a solution right? It's driving me crazy
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Friday, August 14, 2009 6:17 AM
|
|
|
|
|
i am developing the billing module of a clinical management system.i have a data grid in my windows form in which the bill details are generated automatically..i want to pass some of the person details and the datagridvalues to the crystal report so that i can take the printout.how can i pass the values to crystal reports from the windowsform.The datagrid values are taken from seperate seperate tables in the database
|
|
|
|
|
Please don't cross post questions. It generally doesn't help you get an answer any faster and can result in multiple locations to find an answer to the question. The original question is here[^].
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Anyone ever have an issue with signtool.exe where it freezes up?
I'll run it one minute and it doesn't work, then a few minutes later it works fine. Also, suspiciously Internet Explorer will stop working.
I've already ruled out anti-virus software.
|
|
|
|
|
The SignTool can also go out to a website that provides a timestamp. Perhap's you're having internet connection issues?
|
|
|
|
|
That could be.
Although IE doesn't work Chrome accesses the internet fine. Maybe it's an M$ thing.
|
|
|
|
|
Hi,
We need to export the content of a docx file (MS Word 2007) to docx/HTML in sharepoint portal. For this, we are evaluating using System.IO.Packaging library available in .Net 3.5 WindowsBase assembly. We can identify text in the document and export it. However, we are still not finding any easy way out for exporting images, tables, attachments etc. If you have any solution to the problem or working experience with packaging library, please let me know. This is urgent.
Thanks,
Bijon Roy
|
|
|
|
|
I came across some great articles about merging wave files, but unfortunately the wave files I use are imported by the user. Therefore, it is quite likely that one wave file has a different sample rate/bps than the other one. When I try to merge them, Windows Media Player cannot play them, most probably because they have different sample rates/bps. How would I go about making the wave files have the same sample rate/bps as each other, in .NET, so they can be merged properly?
Thanks.
|
|
|
|
|
It depends on the quality you want to achieve, and whether you want to do it in real time.
* for very low quality, simple sub-sampling will work
* for medium quality use linear interpolation of samples
* for high quality, use a more complex method such as sinc interpolation
There are some useful resources here...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Thanks, I'll use your suggested web site.
|
|
|
|
|
hi,
I am using .net 1.1 version.
The problem is i have used one datagrid which contains some data columns and one checkbox column.
Datagrid contains nearly 50 records and 50 checkboxes.(i.e) each record contains checkbox.
below the datagrid an image button is placed.if i didn't select any checkboxes and click on the image button it should tell please select any two checkboxes for compare.
how to do this if i used .net 2.0 then the OnClientClick event can be used but i am using .net 1.1 so please any one help me....
Regards,
Prakash
|
|
|
|
|
Judging by the fact that you talk about OnClientClick, I would suggest that you would get better responses if you post your question in the Web Development forum.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Does the .NET version of VC++ compile into native code?
|
|
|
|
|
You can use Visual Studio (versions above 6, including C++ Express) to build either Win32 (=Native code) or CLR (=Managed .NET code) applications. Check under menu File/New/Project...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
ok thanks. I have both VS6 Enterprise and VS.NET Express. Just not sure which I should go with for my, hopfully, commercial project. I can say VS6 Enterprise.
modified on Wednesday, August 12, 2009 4:29 PM
|
|
|
|
|
I'm not sure VS6 runs fine on recent Windows versions (Vista, 7).
Anyway, I decided against it some time ago; why keep it around as newer VS versions can handle the same job?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi All,
I hope i am posting in the right forum as i am looking for a .Net related solution rather than a pure XML solution.
I have the following class which i serialise using default XML serialisation.
Class UserA
UserID
UserName
Description
Comments
End Class
Later, my requirements changed and i had to generate 2 views of the same data.
In my 1st view, i would generate XML for the whole object (all 4 properties)
My 2nd view - include only UserID and UserName.
i modified the code as below
Interface iUser
UserID
UserName
End Class
Class UserA
Implements iUser
UserID implements iUser.UserID
UserName implements implements iUser.UserName
Description
Comments
End Class
I intended to serialise appropriate objects (iUser or UserA) based on my view requirements.
Unfortunately, i realised that XML serailisation does not work on interfaces - end to my dreams of getting it easy
My question is - if i have an Object instance, can i use any feature with serialisation to generate multiple views of an object?
I have ventured towards creating seperate classes, ISerializable, etc.
looking for suggestions on whats the best way to take this forward.
Thanks in advance.
modified on Thursday, August 13, 2009 4:23 AM
|
|
|
|
|
It might be worth bearing in mind that you can implement IXmlSerializable in an object and just dump that into the object hierachy you use the automated serializer for (XmlSerializer). The serializer will call the IXmlSerializable instead of using reflection, which means you could do your branching in there.
However, it could be a maintainance time bomb. ^^
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Its the maintenance i was worried about. But there appears to be no better way.
Many thanks for posting your suggestion.
|
|
|
|
|
Hi All,
I'll be happy to get your option on this, i have a webservice that uses Semaphore to access shared (VB) resources and i noticed that when there is an high volume of webservice calls the semaphore could no make locks using the WaitOne() method, when using it, it throws an exception "Thread was being aborted." after 2 minutes.
I believe its aprobably a timeout error, but not sure what is the cause..
Can someone please explain what effects the lock? why t could be completed? what effects the timeout and can i configure somthing on the code or IIS or machine level to prevent that?
Thanks
|
|
|
|
|
Member 3300969 wrote: high volume of webservice calls the semaphore could no make locks using the WaitOne()
Semaphore in a web service? it doesn't looks good to me.
Semaphore will only allow the specified number of threads at a same time. When more number of threads calls WaitOne() , it will be queued and processed only when some thread releases the lock.
Probably you should provide more information about your method like what it does and why semaphore is used, etc.
|
|
|
|
|
why not?
I need to provide access to unmanaged resource, the first thread works fine, locks, get the resource and release, the problem is with the second thread, when the first thread is still using the resource the second thread hangs on WaitOne.
any idea?
|
|
|
|
|
Do you want to give access to only one thread at a time? If yes, semaphore is not the right class. Use simple locking. Also try to minimize the time you spend inside critical section.
|
|
|
|
|
Member 3300969 wrote: I believe its aprobably a timeout error, but not sure what is the cause..
Probably waiting on the thread provided by the service handler, which
you shouldn't do. Webservice operations that take time or do any waiting
should be implemented asynchronously - then you'll have control over the
thread's lifetime.
I personally would focus on why anything is taking two minutes
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all, I have been asked to change the communication layer of our client server application from Remoting to WCF, and it is revealing a nightmare task because we are using everything that WCF doesn't like (interfaces, generics and so on).
Now I have a specific question regarding our architecture.
Currently, when the server starts it creates a remote object (singleton). When the client starts, it connects to the server, gets that remote object and request a new remote object wich will handle the communication with the server and the underlying database. So, one remote object is available for client to connect, and for each clien a new object is created. Client access this object through an interface to it.
This seems to be the wrong approach for WCF, as the server cannot create a server activated object wich will be then marshalled to the client through an interface: AFAIK object in WCF are always serialized, no matter if the derive from MarshallByRefObjec, no proxy will be created and the object will be serialized.
I was able to make that work using the NetDataContractAttribute, but the actual object implementation must be on the clien, and of course we would avoid to have all the server logic on the client (we would also it to be executed on the server, so that serialization/deserialization process does not really suit our needs). I suppose that we need a major refactoring of our architecture, so my question is:
which are our options to make this transition as easy as possible (that is, trying to keep our current architecture)?
Thank you all!
|
|
|
|