0

I have a problem with my project. My project had a target framework 4.5.1 and everything worked fine. I changed my project's target framework to 3.5 and got problems.

Firstly I had to change some code (ex. Task replace with Thread, etc.) When there was no more errors I decided to build a project and build was successed. When I try to run my project I got error:

Error while trying to run project. You can not load file or assembly or one of its dependencies. It was expected that the module will contain the assembly manifest.`

When I change to taget framework v4.5 everything works. But not when target framework is set to v3.5. I checked every reference of this project and all of them are targeting framework 3.5 or less.

I used this TOOL Logs says something like this:

(...) The result links: hr = 0x80131018. There is no description available. Manager set loaded from C: \ Windows \ Microsoft.NET \ Framework64 \ v2.0.50727 \ mscorwks.dll (...) ERROR: error while extracting the import manifest file (hr = 0x80131018). ERROR: Could not complete installation kit (hr = 0x80131018). Probing completed. (...)

I also tried to clean and rebuild solution but didn't help. But as I said there are no errors on error list, build is completed successfully. This error occurs when I try to run project.

EDIT: Full list of project's references: Full list of project's references

fuslogvw trace path:

* Assembly Binder Log Entry (2016-08-01 @ 13:42:46) *

The operation failed. Bind result: hr = 0x80131018. No description available.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll Running under executable C:\svn_repos\szynaka\KlasyElem\Build całości\Kiosk_net35.vshost.exe --- A detailed error log follows.

=== Pre-bind state information ===

LOG: User = Paweł-PC\Paweł

LOG: DisplayName = Kiosk_net35 (Partial)

LOG: Appbase = file:///C:/svn_repos/szynaka/KlasyElem/Build całości/

LOG: Initial PrivatePath = NULL

LOG: Dynamic Base = NULL LOG: Cache Base = NULL

LOG: AppName = NULL Calling assembly : Microsoft.VisualStudio.HostingProcess.Utilities, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

===

LOG: This bind starts in default load context. LOG: Using application configuration file: C:\svn_repos\szynaka\KlasyElem\Build całości\Kiosk_net35.vshost.exe.Config

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

LOG: Attempting download of new URL file:///C:/svn_repos/szynaka/KlasyElem/Build całości/Kiosk_net35.DLL.

LOG: Attempting download of new URL file:///C:/svn_repos/szynaka/KlasyElem/Build całości/Kiosk_net35/Kiosk_net35.DLL.

LOG: Attempting download of new URL file:///C:/svn_repos/szynaka/KlasyElem/Build całości/Kiosk_net35.EXE.

LOG: Assembly download was successful. nAttempting setup of file: C:\svn_repos\szynaka\KlasyElem\Build całości\Kiosk_net35.exe LOG: Entering run-from-source setup phase.

ERR: Error extracting manifest import from file (hr = 0x80131018).

ERR: Failed to complete setup of assembly (hr = 0x80131018). Probing terminated.

EDIT2: Manifest file with ildasm.exe: Manifest file with ildasm.exe

Community
  • 1
  • 1
XardasLord
  • 1,764
  • 2
  • 20
  • 45
  • You appear to not have succeeded in retargeting *all* of the assemblies you use. We could tell more if you would have posted the entire fuslogvw trace instead of just this small part of it. – Hans Passant Aug 01 '16 at 10:43
  • I edited a post and added a full list of project's references and a fuslogvw trace – XardasLord Aug 01 '16 at 10:52
  • 1
    "entry into the installation phase starting with the photographic credits". Seems you used the wrong camera. If you want help from an American website then you first need to teach your computer to speak English. Google ".net disable language pack" for basic hits. – Hans Passant Aug 01 '16 at 11:29
  • @HansPassant, ok I deleted my region language pack for .net and edited my post again – XardasLord Aug 01 '16 at 11:46
  • 1
    It simply does not recognize Kiosk_net35.exe as a valid .NET assembly that can run on CLR version 2.0.50727. How this happened is impossible to guess. You'll know a bit more when you look at the manifest in the file with ildasm.exe version 4. – Hans Passant Aug 01 '16 at 12:03
  • @HansPassant I added a screenshot of manifest file opened with ildasm.exe version 4 as you said. – XardasLord Aug 01 '16 at 12:27
  • I don't see anything wrong with it. The only remaining theory is that the file that got deployed onto the machine isn't the one that you looked at. – Hans Passant Aug 01 '16 at 12:35
  • So what else can I try do to make it work? I need it in .net version 3.5 – XardasLord Aug 01 '16 at 13:16
  • Maybe I will just try to create it again as a new project from the beginning and let's see if it'll solve a problem – XardasLord Aug 02 '16 at 06:02

1 Answers1

0

I solved my problem by creating a new project with .net framework v3.5 instead of changing target framework on existing project.

Everything works now.

XardasLord
  • 1,764
  • 2
  • 20
  • 45