|
I dont know much about the assemblies...But I ll try csc /r option..
Will let u know the results..
Joel
JO
|
|
|
|
|
I use the following command..
csc /t:module Report.cs /r: C:\Crystal\CrystalDecisions.CrystalReports.Design.dll;C:\Crystal\CrystalDecisions.CrystalReports.Engine.dll;C:\Crystal\CrystalDecisions.Shared.dll;C:\Crystal\CrystalDecisions.Web.dll
But I get an error saying these files could not be found..
I verified the path of these files and its right...
Cant understand what m i doin wrong here
Joel
JO
|
|
|
|
|
Pete,
I was able to create a DLL using the /r option...I added reference to the dll in my web project and also used USING statement on my web form...However the Intellisense doesnt work with the classes in this assembly...
Joel
JO
|
|
|
|
|
I use C# EE. I do it the following:
having a Solution called "Application" I inserted two projects.
1. WindowsForm (Executable)
1. Class1 Class (as DLL)
The Assemblies must be referenced to the DLL you use. My WindowsForm Application gets the Ref to Class1.DLL. Then my Application has to include:
<br />
using Class1;<br />
The same works if I would handle another DLL instead of my executable WindowsForm. If you use more DLLs make sure they are "cross"-referenced, but don't overdrive...
Andyancona
andysm00@aim.com
andy@biomedsrl.com
|
|
|
|
|
Does anyone know of a way to read a CMYK image (Pref. Tiff) and get the CMYK values of the pixels rather than the RGB values?
|
|
|
|
|
I am attempting to create a web service that will send and received XML messages via SOAP. I am not certain which way to go on creating my client app. Ultimately , i have an application written in C++ that will have to ultimately receive the message, but is using C++ as a client much more difficult to code than using C#? Any advice or direction is appreciated.
Thanks,
|
|
|
|
|
LCI wrote: is using C++ as a client much more difficult to code than using C#?
Hard to say. For both languages there are tools that support you in doing this. For C# you can use the "Web Services Description Language-Tool (Wsdl.exe)" that creates a client proxy class from the WSDL document of the Web Service. The exact usage and all options are documented on MSDN.
Unfortunately, this tool does not generate such proxy classes in C++. An alternative may be the Apache Axis project that provides a similar tool. I've only used the Java version so far, but I guess the C++ version (Axis C++[^]) has this capability too.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I am tring to use the File.Move function in my app but I cannot get it to work with variables as the source and destination strings.
Heres my code,
I have a couple of text fields supplying info for the source file path and want to use them to place th files found in the parent directory.
String ParentDir = textfield1.Text;
String ChildDir = textfield2.Text;
DirectoryInfo di = new DirectoryInfo(@"c:\"+ParentDir+@"\"+ChildDir+@"\");
foreach (FileInfo fileinfo in di.GetFiles())
{
String newdirectory = @"c:\"+ParentDir+@"\";
//new file name is same as one found
String newfilename = fileinfo.Name.ToString();
String Newdirandname = newdirectory + newfilename;
File.Move(di+fileinfo.Name, Newdirandname);
}
I am very new to C# .Net so please keep any suggestions simple (if they are!).
I am just getting the message that part of the file path cannot be found, but they all exist.
It seems to expect the destination file to already exist, which it won't until I have moved it there?
Any help would be appreciated, many thanks in advance
Mark
|
|
|
|
|
I'd use the System.IO.Path.PathSeparator instead of "\". If you are going to use "\" I think you'll need to change it to "\\" since "\" is an escape character...
Standards are great! Everybody should have one!
|
|
|
|
|
Not if the OP's using @"\", which the OP is.
|
|
|
|
|
I see. My bad. But I'd still use the PathSeparator
Standards are great! Everybody should have one!
|
|
|
|
|
Sorry, PathSeperator didn't help.
I have also tried using MoveTo as that only requires the destination. All I get is 'Could not find a part of the path'
but having added together the variables and written them to the page all seems fine - I can only think it can't find it because it doesn't exist yet, but surely that would be silly right?
|
|
|
|
|
That code should work, there is nowt wrong with it.
Try hardcoding the path into your code rather than getting it from textFields for debugging.
|
|
|
|
|
Try using Path.Combine() to build the path too.
|
|
|
|
|
have tried hard coding it and it works fine.
OK I'll keep searching
thx
|
|
|
|
|
Just a suggestion yyou don't need to use 'ToString()' on the fileinfo.Name <-it is a string
Are you sure the when you call the File.Move() the correct param are being passed?
Programmer: A biological machine designed to convert caffeine into code. Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Try this:
String ParentDir = textfield1.Text;
String ChildDir = textfield2.Text;
DirectoryInfo di = new DirectoryInfo(Path.Combine(Path.Combine("C:\\", ParentDir), ChildDir));
foreach (FileInfo fileinfo in di.GetFiles())
{
String newdirectory = Path.Combine("C:\\", ParentDir);
//new file name is same as one found
String newfilename = fileinfo.Name;
String Newdirandname = Path.Combine(newdirectory, newfilename);
File.Move(fileinfo.FullName, Newdirandname);
}
|
|
|
|
|
ok, as suggested i removed 'ToString()' - that was mainly added due to frustration.
String ParentDir = textfield1.Text;
String ChildDir = textfield2.Text;
DirectoryInfo di = new DirectoryInfo(@"c:\"+ParentDir+@"\"+ChildDir+@"\");
foreach (FileInfo fileinfo in di.GetFiles())
{
String newdirectory = @"c:\"+ParentDir+@"\";
//new file name is same as one found
String newfilename = fileinfo.Name.ToString();
//String Newdirandname = newdirectory + newfilename;
//File.Move(di+fileinfo.Name, Newdirandname);
fileinfo.MoveTo(Path.Combine(newdirectory, newfilename));
//I have changed this to be fileinfo.MoveTo() to avoid passing the wrong parameter but I still get the same message. I also tried the Path.Combine() method but it didn't change anything
I think I have tried testing everything now and it all comes back to the same result.
}
|
|
|
|
|
OK success!
I have added Path.Combine to everything (everything that needed it!)
and it seems to have worked.
However this was a simplified version, I now have to make it a bit more complicated, but I know it works so thanks for all your help, that was great.
Mark
|
|
|
|
|
This line seems to be the problem. You need to change:
markymark82 wrote: File.Move(di+fileinfo.Name, Newdirandname);
into
File.Move(fileinfo.FullName, Newdirandname);
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I have been trying to override System.Windows.Forms.Form's Dispose(bool disposing) method, in order to release the resources held by my form.
However, when I type "override <spacebar>" VS displays a list with overridable items, but it does not include the Dispose(bool disposing) method.
In an earlier post of mine[^], I was instructed to use the form's events to dispose of the resources.
But why not use the dispose pattern if its already implemented by System.Windows.Forms.Form?
And what is the reason for VS not to show the Dispose(bool disposing) method in the list?
Thanks in advance,
Shy.
|
|
|
|
|
You don't need to override the Dispose method, just implement the IDisposable interface and the Dispose method will be called automatically. Since it's not an override it doesn't show up in the code completion feature.
Standards are great! Everybody should have one!
|
|
|
|
|
Hi!
I'm saving images in png format from a tiff file. But only sometimes following error occurs.
A generic error occurred in GDI+.<br />
System.Runtime.InteropServices.ExternalException: A generic error occurred<br />
in GDI+.<br />
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder,<br />
EncoderParameters encoderParams)<br />
at System.Drawing.Image.Save(String filename, ImageFormat format)
Its a windows application.
I've cross checked for the permission etc.
But after lots of Googling I've only got to know that permission issue which is not there in my case. Please reply, it is giving me lots of headaches.
Thanks in advance.
Don't Quit
|
|
|
|
|
Yes, it is a known weakness of GDI+: almost all kinds of failure result in
"A generic error...". My advice is twofold:
1) look carefully at the line numbers that Visual normally shows in its traceback
when a program fails while running from inside Visual Studio. This should tell you
exactly where it fails. (If not, try single stepping).
2) assuming it fails in Image.Save(arg1, arg2, ...) output each of the args to make
sure they are all correct (there may be problems with double slashes/backslashes,
relative vs absolute paths, etc). If all args are correct, check for file already exists,
file is locked, and such things. I suggest you add code to do all that until you
found what is causing your trouble (then you may remove it, or leave it in the catch
that now no longer fires).
BTW: some questions you may ask yourself: does it always succeed the first time ?
does it always fail the second time ? are multiple threads involved, if so could
they overlap their image operations ?
Luc Pattyn
|
|
|
|
|
Thanks Luc for your reply! I will check out everything as told by you.
Don't Quit
|
|
|
|