I have exported the source code of Assembly C Sharp.dll that unity uses using reflector. it gave me various cs files. Now i want to compile them all back into a single dll file. So how do i do it and what program shall i use??
Thanks
In visual studio, create a new class library project. Add your .cs files to the project. Build.
Related
I am working on a Dot Net project and I am using C++ .dll files. I want the output of the program as just a single .exe file(which can easily be given to the customer) rather than multiple files. I have added those files under Properties>> Resources. However, when I tried adding them as Reference, I get the following error: Please make sure that the file is accessible and that is a valid assembly or COM component.
Is there a way to bundle these file into one without using 3rd party tools/extensions?
Plz advise.
Thanks in advance.
I have a class library project which I am using in a UWP project. If I add any usercontrol xaml file in the class library and build it it builds fine. But the UWP project gives an error that it cannot find the .xr file.
Do I need to add the .xr file externally in any folder to my UWP project?
Yeah, for a class library with XAML files, if we want to reference the dll in other project, we need not only the dll itself but also the .xr.xaml file and some other files. Because in UWP environment, the resources are no longer embedded in the assembly but are placed next to the dll as content. See the similar case: How to add xbf files to visual studio project.
The files we need to reference like following:
ClassLibrary1(Class Library name) Folder
ClassLibrary1.xr.xml
UserControl.xaml (UserControl XAML file)
ClassLibrary1.dll
ClassLibrary1.pri
To get these files, we can check the "Generate library layout"
option in the Build configuration under the project's Properties page.
Then we can copy these files to anywhere and the UWP project just need to add reference to the ClassLibrary1.dll file in the Visual Studio, Visual Studio will automatically pick these files up and put them in the appx package when it builds the app.
I am working on the Visual studio 2010. want to create a dll which contains icons just like shell32.dll. Can anyone guide me what I need to do.
Purpose : I just want my fav icons bind with one dll and keep in my root drive and customize me all folder icons and I just need it ot contain Dll thats it.
I have not idea what and all efforted is needed, I am ready to put how much effort is needed.
Any suggestion or comment is welcome.
I am not sure what detail is need so adding the picture of shell32.dll.
You can create a Resource-Only DLL.
From the link:
To create a resource-only DLL, you create a new Win32 DLL (non-MFC)
project and add your resources to the project.
Select Win32 Project in the New Project dialog box and specify a DLL project type in the Win32 Project Wizard.
Create a new resource script that contains the resources (such as a string or a menu) for the DLL and save the .rc file.
On the Project menu, click Add Existing Item, and then insert the new .rc file into the project.
Specify the /NOENTRY linker option. /NOENTRY prevents the linker from linking a reference to _main into the DLL; this option is
required to create a resource-only DLL.
Build the DLL.
I have a website solution that contains three different Silverlight 4 projects, and they all make use of the same Silverlight class library.
I have done this by creating a class library project within the solution, and referencing it from the other Silverlight projects.
BUT the class library is included in every one of the XAPs. The user could end up downloading the same class library multiple times.
How do I canvert the class library into a XAP that can be downloaded once, in the same way that an assembly is?
(And why isn't there a Silverlight Assembly project type in Visual Studio?)
You should use Assembly Caching - it's a way to leave dependent assemblies out of your xap file. Instead you need to deploy them with your xap file by placing them in a seperate zip file in the same folder.
In the properties window of your Silverlight application you can choose to enable Assembly Library Caching. That will automaticly generate a zip file for each cacheably assembly.
In the project References folder in Visual Studio, select the referenced dll that you don't want to be loaded again, and in the Properties window set its Copy Local property to false.
i did a build in vb.net and got one exe file
however, when a user runs the file, it says it is missing one of the libraries (itextsharp).
so the question is, if there is actually a build option in vb.net, why does it not include the library in the same exe file?
You can distribute the iTextSharp DLL with your application. The easiest way to do this is to simply include it in the same folder as your EXE. The DLL should be output to your Project's Debug/Release folder each time you build assuming you've added it as a Reference in your project and the Reference's 'Copy Local' property is set to True.
If you want to distribute one EXE and include the iTextSharp in that, you can use the ILMerge tool (or alternately Gilma from SourceForge) after you build your EXE.
in the properties for the reference set the Copy To Output to Always
ITextSharp is not a library linked in your project output; it's an assembly referenced by your project output. And while VB.Net builds one executable from your source code, the CLR still needs all the referenced assemblies in the same folder as your executable.
To make everything work, you can distribute ITextSharp assemblies along with your app. Alternatively, if you indeed need only one file, you can use ILMerge on your project output and the assemblies you want included. However, you might need to determine all the correct assemblies you need merged. I wouldn't revommend using this tool, unless you understand how it works.
Note: If you want to use ILMerge with .Net v4.0, read this page.