How to add f# file to c# class library [duplicate] - c#

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to mix .cs (C#) and .fs (F#) files in a single Visual Studio Windows Console Project? (.NET)
I have a c# class library project. What is the best way to get f# files working in the same project?

You can't. You'd need to create these as separate projects. It might however be possible to merge to create a single assembly on build using ILMerge.

Related

What is the best way to embed an executable into my Visual Studio project? [duplicate]

This question already has answers here:
Embedding an external executable inside a C# program
(8 answers)
Closed 7 years ago.
I have an executable with dll dependencies that I am using in my program and I want to be able package the other exe and dlls together with my application. This is a c# application and I am not sure what the other exe is (c# or c++).
As of now, I am just referencing an external file (C:\blah\bin\blah.exe) with the exe and dlls, but this won't work once other people start using the application and will need the exact exe file location.
Is there a good way for me to embed this exe into my application?
You can use resources for that purpose: https://support.microsoft.com/en-us/kb/319292/
https://msdn.microsoft.com/en-us/library/f45fce5x(v=vs.90).aspx
Another link: https://msdn.microsoft.com/en-us/library/7k989cfy(v=vs.90).aspx

Add a file and import it to projects in same solution? [duplicate]

This question already has answers here:
How do you share code between projects/solutions in Visual Studio?
(17 answers)
Closed 8 years ago.
I want to have a file with some enum's and use them in several projects in the same solution.
How could I use the same enums throught projects in the same solution instead of having to copy them into every .cs file?
Im from xcode and obj-c and not very used to Visual Studio c# :(
If you have multiple projects that need to share source code you would create a new project as a class library type. Add the code to that project and then add it as a reference to the other projects that need it. Visual Studio will then handle building and sharing of the code for you.
To use the code in those projects you will have to define the using of the shared project in the C# files that need it.
If you need more detailed instructions. Just let me know.

Visual C# to Visual C++ [duplicate]

This question already has answers here:
How to use c# Dll in vc++?
(3 answers)
Closed 9 years ago.
I need to use dlls, headers and functions from a Visual C# project in a Visual C++ project.
I tried to add the dlls via "Add References" but I keep getting this error...
Caching metadata information for e:\linha_3_os179\indutron_opc\treiberdlls\elabo.devices.g_series.deviceplugin.dll
Any suggetions?
Thanks!
I would try to expose the c# code as COM objects and then use COM from c to call them

How to Compile projects in another console application [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Place all output dlls in common directory from Visual Studio
I have a solution which is having 15 projects.
Now i want to compile all these project and save dlls into another location using another console application.
MSBuild or Nant

Including dll's in the exe? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
.NET windows application, can it be compressed into a single .exe?
I have a project that relies on several dlls and once I compile it, it requires that I run the .exe in the same folder with the dlls. Can I package them together so I don't have to do that?
For reference, I'm using C#
You can use ILMerge to combine them into one.

Categories