[Extended DateTime] Extension code does not compile in OS11

[Extended DateTime] Extension code does not compile in OS11

  
Forge Component
(5)
Published on 7 Nov by Caio Santana Magalhães
5 votes
Published on 7 Nov by Caio Santana Magalhães

Hi, I'm trying to install this extension however i can open it and view the source code, but compiling is not successfull. 

When deleting/removing the secondary project, the DateTimeTest one, compile is successfull however uploading to environment is not successfull due to DateTimeTest files missing.


Errors given at original compile:

unsuccessful .NET Compilation.

Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
 DateTime -> C:\Users\carina_boom\AppData\Local\Temp\OutSystemsTemp\2018-10-23 12-11-58 bjfWNxUxRU2HF75I7YS4Ww\8JY64zBNVUWNRp94XNDw1g\Source\NET\bin\OutSystems.NssDateTime.dll
Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
CssDateTimeTests.cs(1,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
CssDateTimeTests.cs(14,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
CssDateTimeTests.cs(14,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
CssDateTimeTests.cs(26,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
CssDateTimeTests.cs(26,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
CssDateTimeTests.cs(11,6): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?)
CssDateTimeTests.cs(11,6): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?)

Have you installed the "Microsoft Visual studio Quality tools unitTestFramework"? It is a .NET library. Make sure to use Nuget package manager in your project to add this library and rebuild the project in Visual studio. Then the errors should go.

Thank you for your answer. I am now venturing outside Outsystems territory a little, I realise, but sadly I am unable to install the VS.QualityTools.UnitTestFramework within the Nuget package manager due to the long path error Visual Studio gives me. Am unable to "save solution as" elsewhere, because it "Can only be saved into the project location" - the path which was created automatically with Outsystems11 when i opened the source code from Integration Manager.

The VS error given is: SeverityCodeDescriptionProjectFileLineSuppression State
ErrorThe specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Chetan Yewale wrote:

Have you installed the "Microsoft Visual studio Quality tools unitTestFramework"? It is a .NET library. Make sure to use Nuget package manager in your project to add this library and rebuild the project in Visual studio. Then the errors should go.



I see. So, you downloaded this forge component (extension) and saved it.

Did you save it in another drive (excluding C drive)?

I think if you save it in another drive(say D drive) and then open this extension from Integration studio, it should save it in D drive. Does integration studio have a setting to change the default location where it saves projects?


If above does not work, try using the mkLink command on windows command prompt.

Basically you can create a "soft link" or alias to the long folder name.

Refer this: https://stackoverflow.com/questions/17807281/visual-studio-pathtoolongexception-even-when-the-path-length-is-less-than-260

The second answer mentions it.


1. So first create the shorter soft link

2. Open integration studio, and try opening the project by navigating to the soft link from it.

3. If you are able to open the project from the alias link, further problem will not come.

Solution

I don't have a P11 platform available; but when I will make a P11 version available ASAP.

In the latest (P10) version I removed the Test Project; so the Compilation Error refering the "Microsoft.VisualStudio.QualityTools.UnitTestFramework"; is solved.

Kind regards,

Matthias

Solution

Carina,

In the latest (P10) version I removed the Test Project; so the Compilation Error refering the "Microsoft.VisualStudio.QualityTools.UnitTestFramework"; so this version should compile in P11. 

Does this solve you problem? (if so please mark as solution)

Kind regards,

Matthias

Carina wrote:

Thank you for your answer. I am now venturing outside Outsystems territory a little, I realise, but sadly I am unable to install the VS.QualityTools.UnitTestFramework within the Nuget package manager due to the long path error Visual Studio gives me. Am unable to "save solution as" elsewhere, because it "Can only be saved into the project location" - the path which was created automatically with Outsystems11 when i opened the source code from Integration Manager.

The VS error given is: SeverityCodeDescriptionProjectFileLineSuppression State
ErrorThe specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Chetan Yewale wrote:

Have you installed the "Microsoft Visual studio Quality tools unitTestFramework"? It is a .NET library. Make sure to use Nuget package manager in your project to add this library and rebuild the project in Visual studio. Then the errors should go.