@@ -33,20 +33,30 @@ public class CSharpProjectInfo {
3333 performOnNetCore ();
3434 checkAllRequiredValuesFound ();
3535 }
36+
37+ public boolean IsDotNetCore (){
38+ if (targetFramework ==null )return false ;
39+ return targetFramework .toLowerCase ().contains ("netcoreapp" );
40+ }
3641
3742 private void performOnNetCore () {
3843 //Net core project files contain only non default settings, so set defaults if not set
3944 if (targetFramework !=null && targetFramework .startsWith ("netcoreapp" )){
4045 if (paths .isEmpty ()) {
4146 paths .add (convertPath ("bin\\ Debug\\ netcoreapp2.0" ));
4247 paths .add (convertPath ("bin\\ Release\\ netcoreapp2.0" ));
48+ paths .add (convertPath ("bin\\ Debug\\ netcoreapp2.1" ));
49+ paths .add (convertPath ("bin\\ Release\\ netcoreapp2.1" ));
50+ LOG .debug ("Set Outputpath to default" );
4351 }
4452 if (type == null ){
4553 type = "Library" ;
54+ LOG .debug ("Set OutputType to default (Library)" );
4655 }
4756 if (name == null ) {
4857 File projectFile = new File (project );
4958 name = projectFile .getName ().replace (".csproj" , "" );
59+ LOG .debug ("Set AssemblyName to default (" +name +")" );
5060 }
5161 }
5262
@@ -76,18 +86,23 @@ private void scanProjectFile() throws IOException {
7686 Matcher m = patternType .matcher (currentLine );
7787 if (m .find ()) {
7888 type = (m .group (1 ));
89+ LOG .debug ("Found OutputType (" +type +")" );
7990 }
8091 m = patternName .matcher (currentLine );
8192 if (m .find ()) {
8293 name = (m .group (1 ));
94+ LOG .debug ("Found AssemblyName (" +name +")" );
8395 }
8496 m = patternPath .matcher (currentLine );
8597 if (m .find ()) {
86- paths .add (convertPath (m .group (1 )));
98+ String path = convertPath (m .group (1 ));
99+ paths .add (path );
100+ LOG .debug ("Found OutputPath (" +path +")" );
87101 }
88102 m = patternTargetFramework .matcher (currentLine );
89103 if (m .find ()) {
90- targetFramework = m .group (1 );
104+ targetFramework = m .group (1 );
105+ LOG .debug ("Found TargetFramework (" +targetFramework +")" );
91106 }
92107 }
93108 } finally {
0 commit comments