Orchard 1.8.x branch warning when ClickToBuild

Topics: Core, General, Troubleshooting
Aug 11, 2014 at 10:10 AM
Edited Aug 11, 2014 at 10:57 AM
Hello I decided to switch to the 1.8.x branch instead of using the latest ZIP version.
In order to keep up to date with the latest fixes.
I downloaded SourceMap in order to fetch the latest branch version.

I clicked on ClickToBuild. After 19 Minutes it showed me 4 warnings.

How to solve these warnings?
"F:\mj\vs13\1.8.x\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\1.8.x\src\Orchard.sln" (Clean target) (2) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Orchard.Web.csproj.metaproj" (Clean target) (
3) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Azure.MediaServices\Orchard.A
zure.MediaServices.csproj" (Clean target) (71) ->
(PreComputeCompileTypeScript target) ->
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Micros
oft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no fi
les for compilation, so it will skip compiling. [F:\mj\vs13\1.8.x\src\Orchard.W
eb\Modules\Orchard.Azure.MediaServices\Orchard.Azure.MediaServices.csproj]


"F:\mj\vs13\1.8.x\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\1.8.x\src\Orchard.sln" (Build target) (2:2) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Orchard.Web.csproj.metaproj" (default target)
 (3:2) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Azure.MediaServices\Orchard.A
zure.MediaServices.csproj" (default target) (71:4) ->
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Micros
oft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no fi
les for compilation, so it will skip compiling. [F:\mj\vs13\1.8.x\src\Orchard.W
eb\Modules\Orchard.Azure.MediaServices\Orchard.Azure.MediaServices.csproj]


"F:\mj\vs13\1.8.x\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\1.8.x\src\Orchard.sln" (Build target) (2:2) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Orchard.Web.csproj.metaproj" (default target)
 (3:2) ->
"F:\mj\vs13\1.8.x\src\Orchard.Tests.Modules\Orchard.Tests.Modules.csproj" (defa
ult target) (34:5) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Comments\Orchard.Comments.csp
roj" (default target) (11:5) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.c
sproj" (default target) (9:12) ->
(ResolveAssemblyReferences target) ->
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(1697,5): warning MSB3277: Found conflicts between different versions of the
same dependent assembly that could not be resolved.  These reference conflicts
are listed in the build log when log verbosity is set to detailed. [F:\mj\vs13\
1.8.x\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj]


"F:\mj\vs13\1.8.x\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\1.8.x\src\Orchard.sln" (Build target) (2:3) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Orchard.Web.csproj.metaproj" (default target)
 (3:3) ->
"F:\mj\vs13\1.8.x\src\Orchard.Tests.Modules\Orchard.Tests.Modules.csproj" (defa
ult target) (34:13) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Comments\Orchard.Comments.csp
roj" (default target) (11:13) ->
"F:\mj\vs13\1.8.x\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.c
sproj" (default target) (9:41) ->
  C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(1697,5): warning MSB3277: Found conflicts between different versions of the
same dependent assembly that could not be resolved.  These reference conflicts
are listed in the build log when log verbosity is set to detailed. [F:\mj\vs13\
1.8.x\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj]
Image
Aug 11, 2014 at 12:35 PM
Edited Aug 11, 2014 at 3:42 PM
Install-Package Mono.CSharp for orchard.Scripting.CSharp in the Package Manager console solved the second warning.

And I have got this left:
Image

Issue 2
After checking in the sources in TFS online I downloaded them again to see if anything is working properly.
Then this unit test failed:

NUNIT : 1) TearDown error : Orchard.Tests.Environment.Extensions.ExtensionFol
dersTests.IdsFromFoldersWithModuleTxtShouldBeListed [F:\mj\vs13\tfs\nuboservDot
Com\1.8.x\Orchard.proj]
Aug 12, 2014 at 8:27 AM
When I switch to the master branch which should be 1.8.1 I get 73 Errors when I use Click to build!
Aug 12, 2014 at 5:23 PM
You should use master branch. The 1.8.x and 1.x branch are branch with development in progress.
If you have errors about references not working you should use the /orchard/lib folder where everything needed is.
The Mono.CSharp.dll is included in it's project Orchard.Scripting.CSharp in a hidden folder wich is /Orchard/src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Lib
You should not need to add any other package from Nuget.
Aug 13, 2014 at 7:52 AM
Edited Aug 13, 2014 at 8:46 AM
Reagrding the issue with 73 errors on Click To Build with the master branch.

The Batch file has changed (from 1.8.1 to 1.8.x). The new one initialises the visual studio 12 things before 11 and that caused all the errors.

Working (New):
if "%WindowsSdkDir%" neq "" goto build
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8Dev12
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8on64Dev12
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
echo "Unable to detect suitable environment. Build may not succeed."
goto build
Not Working (Old):
if "%WindowsSdkDir%" neq "" goto build
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8on64Dev12
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8Dev12
echo "Unable to detect suitable environment. Build may not succeed."
goto build
Thank you for your calirfication regarding Mono Sharp I will keep this in my mind.


"If you have errors about references not working you should use the /orchard/lib folder where everything needed is. "
I just took the original sources from codeplex and compiled in VS 2013. This was my result.
With the new batch file I have got this result:
Tests run: 1172, Errors: 0, Failures: 2, Inconclusive: 0, Time: 27,3316485 se
conds
Not run: 11, Invalid: 0, Ignored: 11, Skipped: 0
Errors and Failures:
1) Test Failure : Orchard.Tests.FileSystems.LockFile.LockFileManagerTests.Exp
iredLockShouldBeAvailable
   Expected: False
But was:  True
at Orchard.Tests.FileSystems.LockFile.LockFileManagerTests.ExpiredLockShouldB
eAvailable() in f:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Tests\FileSys
tems\LockFile\LockFileManagerTests.cs:line 118

2) Test Failure : Orchard.Tests.FileSystems.LockFile.LockFileManagerTests.Sho
uldGrantExpiredLock
   Expected: True
But was:  False
at Orchard.Tests.FileSystems.LockFile.LockFileManagerTests.ShouldGrantExpired
Lock() in f:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Tests\FileSystems\L
ockFile\LockFileManagerTests.cs:line 130


Tests Not Run:
1) Ignored : Orchard.Tests.ContentManagement.Drivers.FieldStorage.InfosetFiel
dStorageProviderTests.VersionedSettingOnInfosetField
 implementation pending
2) Ignored : Orchard.Tests.ContentManagement.Handlers.Coordinators.ContentPar
tDriverCoordinatorTests.TestDriverCanAddDisplay
 no implementation for IZoneCollection
3) Ignored : Orchard.Tests.ContentManagement.MetaData.Builders.ContentTypeDef
initionBuilderTests.ContentMergeOverlaysSettings
 Merging not yet implemented
4) Ignored : Orchard.Tests.Environment.DefaultOrchardHostTests.NormalDependen
ciesShouldBeUniquePerRequestContainer
 containers are disposed when calling BeginRequest, maybe by the StubVirtua
lPathMonitor
5) NotRunnable : Orchard.Tests.Environment.DefaultOrchardShellTests
 DefaultOrchardShellTests does not have any tests
6) Ignored : Orchard.Tests.Mvc.OrchardControllerFactoryTests.WhenNullOrMissin
gContainerNormalControllerFactoryRulesShouldBeUsedAsFallback
 OrchardControllerFactory depends on metadata, calling base when no context
is causing errors.
7) NotRunnable : Orchard.Tests.UI.Notify.NotifyFilterTests
 NotifyFilterTests does not have any tests
8) Ignored : Orchard.Projections.Tests.Services.FieldIndexServiceTests.EdgeDe
cimalValuesShouldBePersisted
 SqlCe exception
9) NotRunnable : Orchard.Tests.Modules.ImageProcessing.ImageProcessingTests
 ImageProcessingTests does not have any tests
10) Ignored : Orchard.Tests.Modules.Users.Controllers.AccountControllerTests.
ChallengeEmailShouldUnlockAccount
 To be implemented
11) Ignored : Orchard.Tests.Modules.Users.Controllers.AccountControllerTests.
LostPasswordEmailShouldAuthenticateUser
 To be implemented
12) Ignored : Orchard.Tests.Modules.Users.Controllers.AccountControllerTests.
ResetPasswordLinkShouldBeSent
 To be implemented
13) Ignored : Orchard.Tests.Modules.Widgets.Services.WidgetsServiceTest.GetLa
yerWidgetsTest
 Fix when possible
14) Ignored : Orchard.Tests.Modules.Widgets.Services.WidgetsServiceTest.MoveW
idgetTest
 Fix when possible
F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj(145,5): error MSB6006: "nunit-
console.exe" exited with code 2.
Done Building Project "F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj" (Build
target(s)) -- FAILED.


Build FAILED.

"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.sln" (Build target) (2:2) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Orchard.Web.csproj.metapro
j" (default target) (3:2) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Tests.Modules\Orchard.Tests.Mo
dules.csproj" (default target) (35:5) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Comments\O
rchard.Comments.csproj" (default target) (11:5) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Workflows\
Orchard.Workflows.csproj" (default target) (9:12) ->
(ResolveAssemblyReferences target) ->
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(1697,5): warning MSB3277: Found conflicts between different versions of the
same dependent assembly that could not be resolved. These reference conflicts
are listed in the build log when log verbosity is set to detailed. [F:\mj\vs13\
tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Work
flows.csproj]


"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj" (Build target) (1) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.sln" (Build target) (2:3) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Orchard.Web.csproj.metapro
j" (default target) (3:3) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Tests.Modules\Orchard.Tests.Mo
dules.csproj" (default target) (35:13) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Comments\O
rchard.Comments.csproj" (default target) (11:13) ->
"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Workflows\
Orchard.Workflows.csproj" (default target) (9:41) ->
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(1697,5): warning MSB3277: Found conflicts between different versions of the
same dependent assembly that could not be resolved. These reference conflicts
are listed in the build log when log verbosity is set to detailed. [F:\mj\vs13\
tfs\nuboservDotCom\1.8.1\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Work
flows.csproj]


"F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj" (Build target) (1) ->
(Test target) ->
F:\mj\vs13\tfs\nuboservDotCom\1.8.1\Orchard.proj(145,5): error MSB6006: "nuni
t-console.exe" exited with code 2.
2 Warning(s)
1 Error(s)
Time Elapsed 00:07:27.30
Press any key to continue . . .
Aug 15, 2014 at 8:08 AM
Nov 17, 2014 at 2:12 PM
Today I've installed VS2012 with Update 4 and VS2013 with Update 4. Just cloned the source code of Orchard and tried to build it as is. I got the error:

Error 1 The target "PreComputeCompileTypeScript" does not exist in the project. Orchard.Azure.MediaServices

I took a look in file for VS2012 "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets" and compared it with the same file for VS2013 "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets". And I found that in first file Target with name "PreComputeCompileTypeScript" is really absent, but it is in the 2nd file.

I tried to just replace the files from newest version or just copy-and-paste Target "PreComputeCompileTypeScript", but after these actions and trying to Build a Project it just shows me another error:

Error 1 Unsupported file encoding. D:\orchard\src\Orchard.Web\Modules\Orchard.Azure.MediaServices\VSTSC Orchard.Azure.MediaServices

I tried different ways to fix it, but without result. And I think this last error is not actually related to any encoding problems.

Maybe someone have any updates on the solution of this problem?
Nov 24, 2014 at 1:40 PM
Edited Jan 15, 2015 at 3:50 PM
@optiklab,

EDIT:
After coming full circle back to this issue, I used MJost's instructions and changed the code on the ClickToBuild.cmd file and got past all the error without any problems. Thank you!

END EDIT


I stumbled upon the same error message myself. Although in my case, I had the 'Microsoft.TypeScript.targets' file in both directories:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript

AND

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript

I went into the 11.0 directory and renamed the following 3 files in order to back them up:

Microsoft.TypeScript.Default.props --TO--> BAKMicrosoft.TypeScript.Default.props

Microsoft.TypeScript.targets --TO--> BAKMicrosoft.TypeScript.targets

TypeScript.Tasks.dll --TO--> BAKTypeScript.Tasks.dll

Then I just copied and pasted the following files from the 12.0 directory, into the 11.0 directory:

Microsoft.TypeScript.Default.props

Microsoft.TypeScript.jsproj.targets

Microsoft.TypeScript.targets

TypeScript.Tasks.dll

That got me passed the error. I quickly ran into more errors... but they were unrelated.