I am on .Net Core 3.0 and tried to use the following Protobuf types but they are undefined:
(1) Any => Any .Net Core framework types
(2) Duration => TimeSpan
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
Related
I updated a Roslyn parser project to dotnet core 3.1 and when Roslyn tries to open a solution for parsing using the following code:
var properties = new Dictionary<string, string> { ["DesignTimeBuild"] = "true" };
var workspace = MSBuildWorkspace.Create(properties);
Solution solution = workspace.OpenSolutionAsync(Solution).Result;
Will results in the following error:
InnerException = {"An element with the same key but a different value
already exists. Key: DesignTimeBuild"}
It works to parse the same solution in the .Net version of the Roslyn parser project but dotnet core failes. Does Roslyn not support .net Core? I found this thread
https://github.com/dotnet/roslyn/issues/28870
Any ideas about the current status of Roslyn or how to resolve this error?
Solved using the Buildalyzer:
https://github.com/daveaglick/Buildalyzer/blob/master/README.md#roslyn-workspaces
I got this error even i have created a shared lib on was 9, this lib contains all the hibernate 5.4.3 dependency including javax.persistence 2.2
Do you really needs JPA 2.2 ?
I was able to deploy my EAR under WAS 9 using hibernate 5.2.17 (starting from 5.3 hibernate is JPA 2.2 compliant)
WAS 9 it seems compatible only with JPA 2.0 and JPA 2.1
I created the shared lib using following lists of jars
E:\hibernate-release-5.2.17.Final\lib\envers\hibernate-envers-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\jpa-metamodel-generator\hibernate-jpamodelgen-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\c3p0\c3p0-0.9.5.2.jar
E:\hibernate-release-5.2.17.Final\lib\optional\c3p0\hibernate-c3p0-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\c3p0\mchange-commons-java-0.2.11.jar
E:\hibernate-release-5.2.17.Final\lib\optional\ehcache\ehcache-2.10.3.jar
E:\hibernate-release-5.2.17.Final\lib\optional\ehcache\hibernate-ehcache-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\ehcache\slf4j-api-1.7.7.jar
E:\hibernate-release-5.2.17.Final\lib\optional\infinispan\hibernate-infinispan-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\infinispan\infinispan-commons-8.2.5.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\infinispan\infinispan-core-8.2.5.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\infinispan\jboss-marshalling-osgi-1.4.10.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\infinispan\jgroups-3.6.7.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\proxool\hibernate-proxool-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\optional\proxool\proxool-0.8.3.jar
E:\hibernate-release-5.2.17.Final\lib\osgi\byte-buddy-1.6.14.jar
E:\hibernate-release-5.2.17.Final\lib\osgi\hibernate-osgi-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\osgi\javax.interceptor-api-1.2.jar
E:\hibernate-release-5.2.17.Final\lib\osgi\org.osgi.compendium-4.3.1.jar
E:\hibernate-release-5.2.17.Final\lib\osgi\org.osgi.core-4.3.1.jar
E:\hibernate-release-5.2.17.Final\lib\required\antlr-2.7.7.jar
E:\hibernate-release-5.2.17.Final\lib\required\classmate-1.3.0.jar
E:\hibernate-release-5.2.17.Final\lib\required\dom4j-1.6.1.jar
E:\hibernate-release-5.2.17.Final\lib\required\hibernate-commons-annotations-5.0.1.Final.jar
E:\hibernate-release-5.2.17.Final\lib\required\hibernate-core-5.2.17.Final.jar
E:\hibernate-release-5.2.17.Final\lib\required\jandex-2.0.3.Final.jar
E:\hibernate-release-5.2.17.Final\lib\required\javassist-3.22.0-GA.jar
E:\hibernate-release-5.2.17.Final\lib\required\jboss-logging-3.3.1.Final.jar
It is important on the Shared Lib def to check "Class Loading - Use an isolated class loader for this shared library"
and on the Applicatiion --> Class Loader --> Class Loader Order --> select Classes Loaded with Local Class Loader First (Parent Last)
I'm looking too to use up-to-date Hibernate 5.4.x (stable) and in the future the 6.x.. but having similar issue
If eventually you was able to use Hibernate 5.4.x.. can you share ?
Regards
I tried using T4 in a .NET Core 2.0 app project but it seems that T4 doesn't recognize included namespaces. For example, after installing Microsoft.AspNetCore.All package and having the following piece of code:
<## import namespace="Microsoft.Extensions.Configuration" #>
<#+
public class ConfigurationHelper
{
public string ReadConfig(){
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("Configuration\\CodeGenerationConfig.json");
IConfigurationRoot Configuration = builder.Build();
return Configuration["ConnectionString:Server"];
}
}
#>
I got the error:
The type or namespace name 'IConfigurationRoot' could not be found
(are you missing a using directive or an assembly reference?)
Even I tried using assembly directive:
<## assembly name="C:\Program
Files\dotnet\store\x64\netcoreapp2.0\microsoft.extensions.configuration\2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll"
>
But the following error occurred:
System.IO.FileLoadException: Could not load file or assembly
'file:///C:\Program
Files\dotnet\store\x64\netcoreapp2.0\microsoft.extensions.configuration\2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll'
or one of its dependencies. Strong name signature could not be
verified. The assembly may have been tampered with, or it was delay
signed but not fully signed with the correct private key. (Exception
from HRESULT: 0x80131045)
So the question is how can I reference a .NET Core package from within a T4 template?
P.S: I tried Scripty, but it doesn't support .NET Core yet.
Update:
The Visual Studio 2017 and Xamarin Studio now supports to process *.tt files in desing time
but https://github.com/ZeekoZhu/TextTemplatingCore may still be useful if you want to process T4 templates in a dotnet core(netstandard2.0)
project outside IDE (eg. in Linux or macOS with Visual Studio Code)
I'm trying to run a typescript project (I'm using vs2012) and to import angular 2.
the projects is set to AMD module system and ECMAcript 5
In ts filed I'm importing the module:
import ng2 = require('angular2/angular2');
=> in js file it replaced to:
define(["require", "exports"], function (require, exports) {
And I'm getting this require.js runtime error:
Mismatched anonymous define() module: function (require, exports) {
....
// code
....
}
Is anyone knows what the cause of it?
Thanks a lot!
Lior
Try using the new ES6 syntax for importing files.
Example: import {bootstrap} from 'angular2/angular2';
This Angular2 Visual Studio tutorial can help you setup your project.
I am trying to run a simple spring web application with spring-integration-dsl-groovy, but i am getting an below error
org.springframework.web.util.NestedServletException: Handler
processing failed; nested exception is java.lang.NoClassDefFoundError:
org/springframework/integration/Message
Can anyone help me?
Here is my code
#RestController
class SampleController{
#RequestMapping("/welcome")
String start(){
def builder = new IntegrationBuilder()
def flow = builder.messageFlow{
transform {String payload -> "Welcome $payload - Powered by Groovy !!!"}
handle{ println payload }
}
return flow.sendAndReceive("to Spring MVC ")
}
}
Added all required dependecies, including spring mvc, groovy, spring integration
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-dsl-groovy-core:$springInegrationDslGroovyVersion"
spring-integration-dsl-groovy-core 1.0.0 is not compatible with Spring Integration 4.1.4. spring-integration-dsl-groovy-core 1.1.0 is latest version available and its compatible with Spring Integration 4.1.4