N-Tier-Entity-Framework: 'GeneratedTextTransformation.ProjectUtility' does not contain a definition for 'ResolveProjectPath' - entity-framework

When I upgraded to the newest beta (in order to get the fixes in the generator for some inheritance issues allegedly resolved per this question), I received 2 new errors at the same line in the T4 when trying to generate the classes:
Error 9 Compiling transformation:
'Microsoft.VisualStudio.TextTemplatingA3EC3BD3E5F228A9BC1C929F13763FE3AE36C19F432A59FEB1DDE5D0F681EB7C29852716DDA78FEF727C80DDC6674538B07CA98B354C4948632A3F2150F25ADA.GeneratedTextTransformation.ProjectUtility'
does not contain a definition for 'ResolveProjectPath'
and
Error 10 Compiling transformation:
'Microsoft.VisualStudio.TextTemplatingA3EC3BD3E5F228A9BC1C929F13763FE3AE36C19F432A59FEB1DDE5D0F681EB7C29852716DDA78FEF727C80DDC6674538B07CA98B354C4948632A3F2150F25ADA.GeneratedTextTransformation.T4Context'
does not contain a definition for
'GetFullPath'
The error occurs in (project path)\T4\NTierEF.NTierEntityGenerator.CS.ttinclude
Is there something in T4 that I need to fix?

Should've seen this before, but the answer is on their codeplex discussions page:
https://ntieref.codeplex.com/discussions/559965
The solution is to install the beta extension (which is not yet available on the Visual Studio gallery)

Related

Groovy:General error during semantic analysis: java.lang.NoSuchMethodError:

Imported the gradle project from the "complete" folder and received the following error:
Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'
I am using the latest version of Eclipse, 2020-12, with groovy tools installed.
From grails guide
https://guides.grails.org/gorm-without-grails/guide/index.html
Downloaded code sample from github
https://github.com/grails-guides/gorm-without-grails.git
It seems likely to be a version mismatch, but I cannot determine how to correct this problem.
I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.
The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?
I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.
The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94

multiple definition of `bitbang_swd' when building rocket-chip tools

I am trying to build rocket-chip tools according to instructions here: https://github.com/chipsalliance/rocket-tools/blob/master/README.md
I face the following error:
/usr/bin/ld: src/.libs/libopenocd.a(libocdjtagdrivers_la-bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: multiple definition of `bitbang_swd'; src/.libs/libopenocd.a(libocdjtagdrivers_la-remote_bitbang.o):/home/mats/src/rocket-tools/riscv-openocd/build/../src/jtag/drivers/bitbang.h:61: first defined here
I do not understand how the same include file can get included twice.
Any support overcoming this issue is appreciated.

Showing Crystal report error

This following error is raise when run the program
Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll'
What is problem please help some one.
The problem is two type of version are avaliable like version:13.0.2000.0 and version :10.5.3700.0
So Remove any one reference from your project version 10 or 13 and also in aspx pages.

Upgrading EF in pregenerated views: The default target Entity Framework version requires the edmx schema version 2 or lower

I have pre-generated views following the templates of the next link:
http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx
I need to improve to Entity Framework 5.0 but if I replace the schemas as following:
stringBuilder.Replace("http://schemas.microsoft.com/ado/2008/09/mapping/cs", "http://schemas.microsoft.com/ado/2009/11/mapping/cs");
stringBuilder.Replace("http://schemas.microsoft.com/ado/2008/09/edm", "http://schemas.microsoft.com/ado/2009/11/edm");
stringBuilder.Replace("http://schemas.microsoft.com/ado/2008/10/edmx","http://schemas.microsoft.com/ado/2009/11/edmx");
stringBuilder.Replace("http://schemas.microsoft.com/ado/2009/02/edm/ssdl", "http://schemas.microsoft.com/ado/2009/11/edm/ssdl");
I still having the following error:
Warning 3 The default target Entity Framework version requires the
edmx schema version 2.0.0.0 or lower. The specified schema is version
3.0.0.0. To avoid this warning specify the target Entity Framework version explicitly. You can do this by using the EdmGen.exe
command-line tool with the targetVersion option, or by including the
targetEntityFrameworkVersion parameter when calling the GenerateCode
method.
Any idea of how to solve this issue using templates?
What is the equivalent of adding /targetversion:4.5 to EdmGen using templates?
I found the solution to my problem...
There was a leading help in the following link:
http://blog.3d-logic.com/2012/05/28/entity-framework-code-first-and-pre-generated-views/
moozzyk says:
August 5, 2012 at 11:51 pm
I did see this when using Visual Studio 2012 and EF5. For now the workaround is to edit the >template. Change the line 70 from:
var errors = viewGenerator.GenerateViews(mappingItemCollection, writer).ToList();
to:
var errors = viewGenerator.GenerateViews(mappingItemCollection, writer, >EntityFrameworkVersions.Version3).ToList();
Sorry for the inconvenience.
I had to slighlty modify my code in a similar way, from:
IList errors = viewGenerator.GenerateViews(mappingItems, writer);
To:
IList errors = viewGenerator.GenerateViews(mappingItems, writer, EntityFrameworkVersions.Version3);
After that, no warning nor error whatsoever.

Static type checking error for groovy collection.addAll

This message is also posted on grails mailing list.
In addition to my earlier question I downloaded the grails source from github.
Building via documented gradlew install works (almost) perfect. Than I imported the whole project into Eclipse. And with a bit fighting groovy plugins and "project - workspace-groovy-compiler-issues" I only have a few issues left, all boiling down to java Collection modification in groovy classes. For instance in PluginBuildSettings.groovy:
List<Resource> artefactResourcesList = []
...
artefactResources.addAll compileScopePluginInfo.artefactResources
which gives an error:
Groovy:[Static type checking] - Cannot call java.util.List#addAll(java.util.Collection ) with arguments [java.util.Set ]
I really don't see what the issue may be.
I tried changing the artefactResources declaration in PluginScopeInfo from:
Set<Resource> artefactResources = []
to:
Set<Object> artefactResources = []
which takes away error above, but introduces some other problems let alone the unittests. I'm not hindered with extensive groovy knowledge but it looks all perfect valid to me.
I'm using ggts:
Groovy/Grails Tool Suite
Version: 3.1.0.RELEASE
Build Id: 201210061306
groovy-compiler: 2.0.4.xx -20120921
On mac os x 8.2
java 6.0._37
groovy compiler: 2.0 (workspace and project).
With my favorite search engine I found a reference to grails bug 5516, which is solved but it looks resurected
Type checker fails verification of generic types with addAll
Fixed in 2.0 rc 3,