WinObjC building project errors - winobjc

I download the WinObjC files for GitHub and following all the steps. When I try to build the project, I have this problem (using Visual Studio Community 2015)
These are the two errors:
Severity Code Description Project File Line
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "XamlCompositorCS". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. WOCCatalog (WOCCatalog\WOCCatalog) C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Severity Code Description Project File Line
Error LNK1181 cannot open input file 'OpenGLES.lib' WOCCatalog (WOCCatalog\WOCCatalog) D:\WinObjC-master\samples\WOCCatalog\WOCCatalog.vsimporter\WOCCatalog-WinStore10\LINK
1
How do I solve that?

Open included solution in WinObjC/build/build.sln
Select Build / Build Solution

You either need to download the prebuilt SDK (look under "Releases" in github) or, per the above comment:
Open included solution in WinObjC/build/build.sln
Select Build / Build Solution

1.Download the latest release version
2.open ...\WinObjC\build\build.sln
ps:If using virtual machine(Such as PD),make sure all files storing in Windows folder(such as c:\somewhere) instead of Mac folder (such as \\Mac\Home\Desktop)
3.vs 2015 update1 may alert installing wp8/8.1 tools.
4.Building your Solution( Select Build/Build Solution).

Related

Build fail in msbuild source code(https://github.com/Microsoft/msbuild)

I have cloned MSBuild source code from (https://github.com/Microsoft/msbuild) and followed below steps to build the project.
Building MSBuild with Visual Studio 2017
Install Visual Studio 2017.
Clone the source code
Build the code using the cibuild.cmd script
Open src/MSBuild.sln solution and build in Visual Studio 2017
But build is getting failed with following errors when we try to build from VS 2017
The imported project "C:\msbuildgit\msbuild\packages\Nerdbank.GitVersioning\1.5.46\build\dotnet\Nerdbank.GitVersioning.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. Microsoft.Build.CommandLine.UnitTests
The imported project "C:\msbuildgit\msbuild\packages\Nerdbank.GitVersioning\1.5.46\build\dotnet\Nerdbank.GitVersioning.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. Microsoft.Build.Engine.OM.UnitTests
and also following projects are not getting loaded
Microsoft.Build ,Microsoft.Build.Framework,Microsoft.Build.Tasks
Microsoft.Build.Utilities,MSBuildTaskHost
getting following error , when we try to reload above projects
C:\msbuildgit\msbuild\src\Build\Microsoft.Build.csproj : error : The imported project "C:\msbuildgit\msbuild\packages\Nerdbank.GitVersioning\1.5.46\build\dotnet\Nerdbank.GitVersioning.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\msbuildgit\msbuild\src\dir.targets
following options have been tried and both were getting failed
tried restoring nuget packages
tried installing Nerdbank.GitVersioning nuget(https://www.nuget.org/packages/Nerdbank.GitVersioning/)
Please note that cibuild.cmd script has been already executed
Please help us on this.
Issue has been resolve by following below steps ,Jeff Kluge helped on this after raising this issue in GitHub(https://github.com/Microsoft/msbuild/issues/1947)
Open Developer Command Prompt for VS 2017
Run cd /d C:\msbuildgit\msbuild
Run git clean -xfd to clean the enlistment
Run cibuild.cmd --build-only to build the source code

Visual Basic - MSBuild Not Running

I am trying to build a program for x64, but I keep getting the following error messages:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2554,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR4" and architecture "x64". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" exists and can be run.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2575,7): error MSB4028: The "GenerateResource" task's outputs could not be retrieved from the "FilesWritten" parameter. Object does not match target type.
MSBuild.exe exists and can be run, so I don't know why I am getting these errors.
I am using Visual Basic in Visual Studio Professional 2013 (Update 4). I am not using any DLLs, all I am creating is a standalone .exe file.
I've tried searching, both here and on Google, but cannot find anything helpful. Then again, I have a tendency to overlook things, so the answer has probably been screaming in my face for the last hour. I apologise in advance if this turns out to be the case.
Any and all help is very much appreciated.
replace
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe
by
C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe
and try.it should do some difference.this occurs because the version on msBuild.exe has changed after update4 of vs2013.check for version differences..
also i suspect you are trying to build the solution in x86 architecture.if first solution doesnt work,go to the Build tab, change the Platform target from Any CPU" to "x86" and try. hope it helps.
I just encountered this exact same error in a multiple project VB solution when trying to start a debug instance of one project. By forcing a rebuild of that one project I was able to fix the issue and start the debug instance.
I solved this problem by opening the project in Visual Studio 2017, instead of 2015

Can Orchard 1.8.x be installed on a build server that does not have Visual Studio Installed?

I also asked this question on the Orchard forum but no joy there yet. So here it is again...
https://orchard.codeplex.com/discussions/569444 Please read for a few more details.
IF the .NET 4/4.5 SDK came with a developer command prompt (like previous SDKs) then I would not be asking this question.
But since Orchard is build with .NET 4.5 I am getting build errors using the old SDK. It seems that my only option is to install Visual Studio Express on the build server.
I am doing that as we speak so at this point the question is purely academic but I am still curious.
EDIT
STILL NO JOY. Even after installing VS 2013 Express Web the vcvarsall.bat that usually configure the build environment is still not present. So this is no longer a curiosity question. The Express edition also cannot create my build environment. Help.
Seth
Here is my answer...copied and pasted from the forum.
This is a late answer. Bottom line is that I did eventually get our build server to build orchard projects. I am not sure if this is a complete answer or not as I should have answered as soon as I had it done. But I pretty sure this will work.
One other thing to note...It is quite possible that not all of these steps are required. I tried a lot of different things and it might be in the end some of the steps were not needed. It might also reflect a problem on our build server...especially the fact that I had to manually add registry entries.
But here it is without details.
Install the .NET Framework SDK for Windows 7.1.
http://www.microsoft.com/en-us/download/details.aspx?id=8279
Install the .NET 4.5 Full
http://www.microsoft.com/en-us/download/details.aspx?id=30653
Install Visual Studio 2013 Express for Web
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Install the Visual Studio 2013 Build Tools
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Finally, even after that...it didn't work until I added the following registry keys. I would attach the .reg file but I don't see how.
Save the lines between the lines into a fixBuild.reg file. Then double click...
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7]
"FrameworkDir32"="C:\Windows\Microsoft.NET\Framework\"
"FrameworkDir64"="C:\Windows\Microsoft.NET\Framework64"
"11.0"="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\"
"FrameworkVer32"="v4.0.30319"
"FrameworkVer64"="v4.0.30319"
"12.0"="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\"
Finally, to actually do the build, I created a batch file that does the build.
Save the lines between the lines into a doBuild.cmd file. Be sure to place this in the root of the source download...then double click to build...
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
msbuild /t:FastBuild Orchard.proj
The first line gets your environment ready. The second build the project using the FastBuild target in the Orchard.proj file. You can read that file if you want to try other build targets.
******* EDIT
There is one thing I forgot to mention. And that is that one thing you have to do to get this to work is that you have to edit some CSPROJ files because the command line build fails with errors like these...
\Orchard\src\Orchard.Web\Modules\CKEditor\CKEditor.csproj(337,6): error : "None" element name for include "Placement.info" should be "Content".
\Orchard\src\Orchard.Web\Modules\Orchard.Tokens\Tests\Orchard.Tokens.Tests.csproj(82,6): error : "None" element name for include "app.config" sh
\Orchard\src\Orchard.Web\Modules\TinyMceDeluxe\TinyMceDeluxe.csproj(377,6): error : "None" element name for include "app.config" should be "Cont
\Orchard\src\Orchard.Web\Modules\Upgrade\Upgrade.csproj(156,6): error : "None" element name for include "app.config" should be "Content". [C:\Us
\Orchard\src\Orchard.Web\Themes\Themes.csproj(280,6): error : "None" element name for include "Upward\Views\Content-Story.Detail.cshtml" should
The fix is to do exactly what the error indicates. Open the csproj files and search/replace "
Also, some of the projects reference app.config files that do not exist in source. You also have to remove those references. I usually just delete the content node entirely or the group entirely.
Seth

MSBUILD Error MSB4025 in TeamCity build step for Visual Studio

When I run my TeamCity build with the only build step being of runner type Visual Studio (sln), I get the following error:
C:\TeamCity\buildAgent\work\4978ec6ee0ade5b4\Test\Code\Test.sln(2, 1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 2, position 1.
This is on a dedicated CI server running TeamCity Professional 8.1.1 (build 29939). There are several other successfully-running builds on this server.
The odd bit is that the same build runs successfully on TeamCity on my dev machine. I followed an answer to a similar question, and copied the specified folders across, but that didn't help.
I'm sure the project/solution file isn't invalid because in addition to the build running on my dev box, I have opened the solution in Visual Studio and built it there with no problems.
Any suggestions?
I just fixed this.
Look inside the Test.sln file for Project or EndProject tags that aren't closed. For us, the EndProject was missing and it broke on teamcity, but no issues in Visual Studio.
It seems the TeamCity error message will occur for any number of root causes. In my case the problem occurred because a line inside the GlobalSection(NestedProjects) section was referring to a project Guid which didn't relate to any project defined in the Solution file.
As with the previous post I didn't have any issues building in Visual Studio. I only got a more helpful error message that allowed me to discover what the real problem was when I built using msbuild.
See https://therightjoin.wordpress.com/2014/07/04/msb4025-the-project-file-could-not-be-loaded-data-at-the-root-level-is-invalid-error-when-building-ssdt-project-in-teamcity for another example, and where using msbuild helped identify the true problem.
In our case, it was a duplicate project reference in the solution file (caused by near simultaneous commits and an automatic merge).
In our situation the problem was specifying a ToolsVersion that was not installed on that machine. (14 which VS2015 has but VS2017 does not have by default)
In my case, after merging, in .sln file, it was a mismatch of lines under
GlobalSection(NestedProjects) = preSolution
{6B971E15-6B61-4AA8-9B93-9639C23269C3} = {9A14E7EF-3FA1-4B9A-B413-C550B3E5AC62}
{54D14F01-D576-4DE6-9404-D21AD0DC4916} = {9A14E7EF-3FA1-4B9A-B413-C550B3E5AC62}
... (was some extra entry here )
...
EndGlobalSection
section. In clear words, there were some extra lines added after merging. So, If you have merged, please compare two solution files manually. You can start with total line numbers in both files.
In another Case
We had a blank lines - so make sure any blank lines are removed!
Hope this helps some else too!
I got this same error with Jenkins. It turns out the root Jenkins folder was set to C:\Program Files (x86)\ and it didn't have write access to bin and obj directories.
Error:
error MSB4025: The project file could not be loaded. Data at the root level is invalid.
I launched cmd as Administrator and ran this:
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "C:\Program Files (x86)\Jenkins\workspace\BuildBI_1\Reports\Test\ReportsTests.sln" /t:Build /p:RunOctoPack=true
And that gave me clues about not being able to write to bin and obj.
This worked for me-
You can install Build Tools for Visual Studio 2017, make sure to select C++ tools, Windows 10 SDK and MSBuild and your set.
Use MSBuild to identify the underlying problem:
$> msbuild mysolution.sln
Gave me this beauty with the correct error line number:
If msbuild cannot be accessed like that from the command line / powershell, try to find the MSBuild.exe shipped with VisualStudio, e.g. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\amd64\MSBuild.exe.
VisualStudio itself seems to be very "tolerant" against errors / inconsistencies in the solution file, so having it open in VS is no guarantee for the sln file being correct.
I fixed it by updating the solution file.
Another possible problem (and resolution): I had a stray unused solution file in my repo, pointing to who-knows-where, and the MSBUILD step in my Azure DevOps pipeline was set to **\*.sln.

DevForce Error when Run Custom Tool

When I right click on the T4 file and Run Custom Tool, I get the errors
Compiling transformation: Metadata file 'IdeaBlade.VisualStudio.DTE.dll' could not be found
Compiling transformation: Metadata file 'IdeaBlade.VisualStudio.OM.CodeGenerator.dll' could not be found
Compiling transformation: Metadata file 'IdeaBlade.EntityModel.Edm.Metadata.dll' could not be found
Thanks.
That error means that Visual Studio was unable to find some of the DLLs necessary to run DevForce's T4 generation. Probably the easiest way to solve this is by running the Dev Force installer. That will place the necessary DLLs in the GAC where Visual Studio will be able to find them.
I believe you can also add References to these specific DLLs on the project that contains your Data Model but I haven't done that because I prefer to have Dev Force installed on any machine that needs to run the T4s.