I have a bit of an awkward scenario (I think). I have a Asp.Net UserControl in a project which targets the 4.0 framework and also uses a 3rd party dll (Telerik controls).
I tried using vs2010 to copy the usercontrol and required references to the Visual Webpart within an Empty Sharepoint (2010) project. But it will not allow the references to dlls which in turn, reference the 4.0 framework etc.
So my question... is it possible to do this? If so, the steps in a bit of detail would be VERY appreciated.
thanks,
KS
If your third party dll is for .net 3.5 then you can use the dll and use the user control in a same way the smartPart project loads or you can just use the smartpart web part.
But you can not use .net version 4 assembly in sharepoint 2010. SP2010 is targeted for .net 3.5 and only can use assemblies with version 3.5 and before.
The reason you could test the smartpart environment is most probably because you didn't import any dll's targeted for .net 4 or none of the methods included in the uc were from .net 3.5.
Sharepoint 2010 .net version so question here.
Related
I'm using LINQPad 6 and I can't figure out how to add System.DirectoryServices.AccountManagement DLL. I see where I can pick from NuGet stuff, but not standard windows DLL. Previous versions used to list all the DLL and let me pick directly from there. Is that gone?
I don't think System.DirectoryServices.AccountManagement is part of the standard netcore library, but is available as a Nuget package.
If it was part of the standard library, then you would not need to add the dll, but just reference it.
There's no longer an option to add Framework assembly references. In keeping with Visual
Studio, all .NET Core Framework assemblies are referenced automatically.
From the Things that behave differently in LINQPad 6 section of https://www.linqpad.net/LINQPad6.aspx
I have recently written two small apps in Visual Studio 2012 (VB). I compiled them using Framework 4.5. These have been tested on the end user's PC's and the feedback was to try and get the Apps Compiled using Framework 3.5 as this is already installed on the computers.The computers are using Windows 7.
My questions are these:
Is it possible to force a compile to use 3.5 instead of 4.5?
How would I go about doing this?
Yes, it is possible to target the 3.5 framework when you compile.
Go to PROJECT-> Properties (You can also right-click on the project in the solution viewer and select Properties).
Select .NET Framework 35. in the Target Framework dropdown.
The project will be closed and reopened automatically by Visual Studio (you will be asked to confirm this change).
Note that if you have anything specific to .NET 4.0/4.5 that is NOT present in the 3.5 framework you will have to make the necessary changes.
EDIT
A picture is worth a thousand words:
I have external .net library compiled with .net framework 4 (it's provider moved recently to .net 4)
My code currently runs on .net framework 3.5
How to use that external library in my application ?
Moving whole application to .net 4 needs time and testing, so maybe in a future i will do that, but now, what are the possibilities ?
There are no possibilities, the CLR version that comes with .NET 3.5 cannot load 4.0 assemblies. The metadata format was changed. You have to force your app to use the .NET 4.0 CLR version. Do so by recompiling it with VS2010, targeting 4.0, or by using a .config file that contains the <requestedRuntime> element to ask for "v4.0".
Compatibility for .NET 4.0 is excellent btw.
While you cannot load the .Net DLL directly, you can wrap it in a COM interface, and load that COM interface in your .Net 3.5 process.
See Using a .NET 4 Based DLL From a .NET 2 Based Application
For more background information, Microsoft originally added In-Process Side-by-Side in .Net 4 to better support the scenario where an application loads add-ins via COM, and the add-ins were written with various versions of .Net. The ability to load .Net 4 DLLs in a .Net 3.5 process is just a nice side effect of that.
How can I create a VB application in VS2008 without requiring the application be run on a computer with a .NET framework in place?
You can't create a non-managed VB application in VS 2008.
You would have to use C/C++ or go back to VS 6.
You can look at the question below for more information on .NET linkers. That is technically an option, but if I were starting a new application that I didn't want to depend on the .NET framework I would not use a managed language.
Running .net based application without .net framework
You'll need to use a 3rd party .NET linker, Visual Studio itself doesn't support what you're after but a number of tools allow it to be done.
A couple of tools:
Remotesoft Salamander .NET Linker
Xenocode app virtualization
Another, non-VS, option is to use Mono to build a "Bundle" which combines both the runtime and your application into a single executable:
Mono:Runtime - Bundles
You can't. You would need to go back to Visual Studio 6 and create a VB6 app.
You can't. VB is .net based, there isn't a non .net VB anymore.
The best you can do is include the .net redistributable with your application's installation.
I have two .NET projects in the same domain. The first project I create long time ago in VB.NET. Now I create another project that I built in C#. How can I set up my new project in the same domain so I can access the new forms that I built in C#. Do I need to submit the whole folder from the project? Do I need to change anything in the web.config? Right now I am getting this error. [PhoneControl] is the new project in C#.
http://www.martinesexpress-inc.com/PhoneControl/Default.aspx
If you look in the error page it says:
alt text http://img246.imageshack.us/img246/5868/capturevv.png
Version Information: Microsoft .NET Framework Version:1.1.4322.2407;
ASP.NET Version:1.1.4322.2407
And you are trying to use some .NET 3.5 components
Change the website to use .Net 2.0 and make sure the server have .NET 3.5 SP1 installed
If you are using IIS6:
alt text http://img185.imageshack.us/img185/1410/capture2s.png
You're declaring the language correctly in your page?