8

Trying to create a setup project in Visual Studio 2015. When I add my main project, no dependencies are added; not my other projects (dll's), no Nuget packages, not even the .Net Framework.

I did try adding those project dll's manually, but whether I do or don't, I get this build error every time:

------ Starting pre-build validation for project 'ProjectInstaller' ------ 
ERROR: An error occurred while validating.  HRESULT = '80070057'
------ Pre-build validation for project 'ProjectInstaller' completed ------

Of note, this error only appears in the output, not the error list. So any ideas why the dependencies are not added? Why the build is failing? What does that error code even mean?

(As an afterthought, I have successfully built an install file on a different solution set altogether; I'm thinking maybe it's some setting in my project properties).

Sonic1015
  • 55
  • 1
  • 16
  • Despite of the fact, that the question is quite old, I am seconding it. There are >100 projects in my solution, so I don't know where to start. However, I have two projects that use unsafe, and I get HRESULT = '80070057' twice. I wonder if that could be the reason. – Kolya Ivankov Jul 14 '17 at 14:40
  • 80070057 is just "E_INVALIDARG". It just means a method somewhere is called with wrong arguments, which is of no help really. If you're talking about this https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2015InstallerProjects have you tried to uninstall + reinstall it? – Simon Mourier Jul 16 '17 at 07:14

2 Answers2

1

I had a .NET 4.5 application with a setup project that gave this error while the application was using the 'Windows.Data' reference (at: C:\WINDOWS\System32\WinMetadata\Windows.Data.winmd), even though the application was able to compile. Once removing that reference, the setup project was able to build.

gotorg
  • 147
  • 1
  • 10
0

I researched a bit on you problem. I found similar situation that is similar to you . try these links

http://www.tylerforsythe.com/2013/10/could-not-load-file-or-assembly-hresult-0x80070057-e_invalidarg/

https://social.msdn.microsoft.com/Forums/en-US/352c58ec-65d8-4d77-ac7b-d2338c621ef3/could-not-load-file-or-assembly-the-parameter-is-incorrect-hresult-0x80070057-einvalidarg?forum=csharpide

Ramankingdom
  • 1,478
  • 2
  • 12
  • 17
  • Well, in my case all the temporary ASP.NET files were already deleted, the directory is empty. I will give disassembling a try, and perhaps just reinstall Visual Studio if nothing helps. – Kolya Ivankov Jul 18 '17 at 10:16
  • 2
    @KolyaIvankov try these also may be help https://stackoverflow.com/questions/8269386/could-not-load-file-or-assembly-the-parameter-is-incorrect/8269493#8269493 – Ramankingdom Jul 18 '17 at 10:24
  • Did it before, checked out once again, there is no Temporaty ASP.NET files in my Users :( – Kolya Ivankov Jul 18 '17 at 10:38
  • Thank you for the research. Unfortunately, I moved on to Visual Studio 2017 quite some time ago and have not had that problem since, so I can't confirm if your answer solved my problem. If it solves someone else's problem though, I'll mark it as the answer. – Sonic1015 Jul 21 '17 at 15:32