I'm working on a library with a couple of webparts for Sharepoint 2010. One of them needs to contact Lombardi BPM to get information. The RESTful API returns xml data, which seem to need a schema. I've found where the xsd files are located within my Lombardi installation, but how do I include them in my C# library to use them when reading the XML data?
Probably you should copy those .xsd files to \Xml\Schemas
(or to your solution)
Related
When we build a C# project in Visual Studio, a file with extension .csproj is created, which lists the contents of the project and configures how it should be built. It's said that a .csproj file has XML format, however, I've been reading the book "Programming C#" by Ian Griffiths which said the format of a project file is "usually" XML. So I'm asking if there is any other formats for project files? If yes what are the formats and where are they used?
You can find good information in this document: Understanding the project file
Microsoft Build Engine (MSBuild) project files are based on the MSBuild XML schema.
I downloaded both sample code and WSDL files on the website.
I checked that there are some text documents inside of WSDL folder.
It was based on SOAP, but I don't know how to apply.
How do I apply for SOAP file in the sample code?
It seems like the example queries.
Could you tell me how to do?
you actually do not want to think about the other files in that same folder where your WSDL is located. Just add a Web Reference to your project and direct it to your WSDL. This should add a reference to your project under which you will see all these other files. WSDL will automatically refer those files when needed.
Older VS (using C++) allowed (as far as I can remember) grouping of related sources to sort of groups. Something like Headers group, Sources group etc.
Is it possible to group files in such way in VS2013 using C#? Even if it does mean manual edit of the project xml files.
The only way I have found is to create a Folder, but the requirement is to have flat structure on disk and tree structure in project.
Edit:
It is called Filter in the C++ projects.
And it seems impossible for C# as already discussed here.
I think the only Folder that matches is the Solution Folder, but you cannot use it inside a Project, only in solution Level.
You can group files or Projects in it.
Solution -> Add -> New Solution Folder
I have formed a number of source code files as my library. For example, I wrote LinqExtension.cs providing Median() function.
Now I'm working on a project which needs LinqExtension.cs. As usually, I link the file to the project. As introduced here. The reason that I link files rather than copying them is to keep the files at a single location. If I modify a file, all dependent projects get affected.
I also add the project to Subversion and upload to and download from Google Code. The linked file is not under version control.
I work on the project at home as well as at office. I hate copying the linked file to my office, which makes the file not single.
I figure out a solution that add <Compile Include="http://www.example.com/LinqExtension.cs"/> to csproj file so that the file only exists on the Internet. Once I upload a new verison of the file, all dependent projects get affected. Unfortunately the solution doesn't work.
Any other suggesions or better practice?
A better way would be to share your core library at the binary level, rather than at source code. You could set up a private Nuget repository to make this easier.
If it is absolutely necessary to share files, you can use pre-build actions in your project to copy the file from a common location, or even download them from google code. It's not clean, but if you don't want to use source control for it then I don't think you will find a clean way.
I like to keep a library folder of binaries in my Dropbox. That way Common libraries that I use can be accessed from my home and work project workspaces and the service keeps the version up to date.
I have some pdf's templates that are being used across many web applications.
Can I add pdf's files to dll project?
Thanks
J
You can certainly add them to the project, but I don't think that's what you're asking.
Even if you add them to the project, they will not be embedded into the DLL. You could use some kind of hideous base64 encoding in a string, and deserialise it later, but that's just horrible.
Your best bet would be a shared directory or server, or just to submit to copying the PDF to each application directory manually.