When using PSSLN file, I get the following error in TFS MSBUILD. How do I fix it? The project builds in VisualStudio.
Here is the snippet from TFS build log
Windows\NewProject.pssln (4, 4) Unexpected XML element: LoggingProfiles.
Windows\packages\PostSharp.5.0.29\build\PostSharp.targets (329, 5)
The process C:\ProgramData\PostSharp\5.0.29\bin.Release\postsharp-net40-x86-native.exe exited with code 11
PostSharp 5.0 logging is a complete rewrite of the log aspect.
Please refer to their documentation regarding this, in particular, check out Customizing the Appearance of Log Records.
More specifically, LoggingProfiles was replaced with Logging as you can see in the quote below. Also, I'd suggest using postsharp.config instead of the old pssln file, although based on the documentation it should work as well.
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.postsharp.org/1.0/configuration">
<Logging xmlns="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics">
<Profiles>
<LoggingProfile Name="Default" IncludeSourceLineInfo="True">
<DefaultOptions>
<LoggingOptions IncludeParameterType="True"/>
</DefaultOptions>
</LoggingProfile>
</Profiles>
</Logging>
</Project>
Good luck.
Related
I just took over DevOps of a continuously integrated, continuously delivered Azure build pipeline, and all was going well… until today, when it's begun failing. I think the failures are due to an overlong file path on the web server.
Here is my error message:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(3000,5): Error : Copying file bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bootstrap\fonts\glyphicons-halflings-regular.eot to obj\Release\Package\PackageTmp\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bootstrap\fonts\glyphicons-halflings-regular.eot failed. Could not find a part of the path 'obj\Release\Package\PackageTmp\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bin\Release\Published\bootstrap\fonts\glyphicons-halflings-regular.eot'.
Process 'msbuild.exe' exited with code '1'.
Evidently, it's just been dumping the project files into an ever-deeper rabbit hole of nested bin\Release\Published directories!
I checked what the resultant server path would be, and it amounts to 262 characters. My understanding is that this is longer than the Windows MAX_PATH value of 260, and I think that this is why my build is failing.
But I can't figure out how to stop that from happening.
My .pubxml file looks like this…
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>bin\Release\Published</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
</PropertyGroup>
</Project>
…but I end up with a bottomless pit of bin\Release\Published\bin\Release\Published\bin\Release\Published\bin…!!
I've updated the .pubxml file and checked it in successfully, but that seemed to have no effect. Here are my "Visual Studio build" pipeline details:
https://i.stack.imgur.com/jNO9U.png
$(BuildPlatform) = any cpu and $(BuildConfiguration) = release. I've tried supplying a different MSBuild argument for /p:PublishUrl, but that also didn't work.
How can I get this endless nesting to stop and my project to build!?
Thank you.
I have setup already joomla 3.1.4 and I tried to install a plugin,But Im getting this error:
JInstaller: :Install: Cannot find Joomla XML setup file
This is my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
<filename>helloworld.xml</filename>
</files>
</extension>
You do not need to specify "helloworld.xml" in your xml file.Remove file and install again.This will be your final xml file-
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.1" type="plugin" group="content" client="myjoomlasite">
<name>plg_content_helloworld</name>
<author>Tahsin Çetin</author>
<creationDate>July 27th,2013</creationDate>
<copyright>Tahsin Çetin</copyright>
<licence>GNU General Public License</licence>
<authorEmail>tcetin#yandex.com</authorEmail>
<authorUrl>http://tahsincetin.com</authorUrl>
<version>1.1.0</version>
<description>Simple Hello World plugin</description>
<files>
<filename plugin="helloworld">helloworld.php</filename>
<filename>index.html</filename>
</files>
</extension>
Hope this will help.
The "Cannot find Joomla XML setup file" usually means you are trying to install an extension that wasn't designed for the version of Joomla you are installing to.
Read more here
In your opening <extension> tag, you do not need to specify a client attribute.
Where is the XML file in relation to your ZIP package? If it isn't at the top level of the ZIP, it won't be found.
Generally when this happens something is wrong with the XML file. If you have made any changes, try to think where those changes were and find a problem with the XML file.
Problems could be:
No opening or closing tag. Closing tags are easy to miss. Count them, make sure there's an opening and a closing tag.
Duplicated tags. It's easy to add two labels or showons for example, especially if you are copying and pasting.
Space before the opening XML tag
No closing fieldset tag
No closing extension or config tag. Easily deleted if you are replacing the file
You can easily use a tool like this:
https://www.w3schools.com/xml/xml_validator.asp
Which will help you to find issues such as missing opening and closing tags.
I'm having a problem with my logj2.xml being seen on my Windows7/64 box running Java 1.7.0_13/64. I'm trying to run the application using the NetBeans/64 7.2.1 IDE via the debugger.
log4j2.xml is sitting in my r:\ directory. The (user)classpath is ".;r:\". It is apparently not being seen, because when I look at the 'config.config.name' of the Logger in my debugger, it gives me the value of 'Default'. Also, I can't find the file specified in the log4j2.xml file anywhere, on any drive, of my machine. I've also looked for any new files containing the word 'default' on my machine, and can find none that are current.
So I suspect I'm doing 1 of 2 things wrong:
1) Setting my classpath incorrectly.
2) Putting my log4j2.xml file together incorrectly.
Any help would be appreciated. My keys are getting sticky from banging them with my forehead.
Here's the config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug" name="xxx" packages="" >
<appenders>
<RollingFile name="log" fileName="qqq.log"
immediateFlush="true" filePattern="qqq-%d{yyyy-MM-dd}.log">
<PatternLayout>
<pattern>"%d{YYYY-MM-dd HH:mm:ss} [%t] %-5level %logger{36} - %n%msg%n%n%n"</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="92"/>
</RollingFile>
</appenders>
<loggers>
<root level="trace">
<appender-ref ref="log"/>
</root>
</loggers>
</configuration>
Ok, got it. I've renamed this question to include NetBeans, because that was the gist of my problem.
As a review, it is required that the log4j2.xml file needs to go on the classpath. While I could affect the classpath in netbeans by adding jar files to the project, I didn't initially think about finding a config file on the classpath. Anyway, once I realized that, I played around a bit in project properties, and finally figured out that just adding the folder to the 'Compile-time libraries' dialog ( in this case "r:\" ) puts the config file on the classpath, and my logging works just like it should.
Whew!
Hope this helps someone.
Thanks joe7pak, your posts were the last piece of the puzzle to solve my log4j properties problem in NetBeans. My problem required a couple extra steps that may help round this solution out.
First, I created a log4j.xml file in the src directory using the default xml from http://wiki.apache.org/logging-log4j/Log4jXmlFormat.
I then set the NetBeans VM options in Properties\Run to: -Dlog4j.debug. I noticed that a jar's (httpbuilder) log4j.xml file was being loaded by default instead of mine.
So I added the src folder to the compile time libraries in Properties\Libraries using your recommendation. However, it was still loading the log4j.xml file from the jar.
The final touch was to move the src folder to the top of the compile time libraries.
Thanks for your post and for answering yourself.
I downloaded wicket examples 1.6.0 and built successfully in netbeans7.2. but got errors when I tried to deploy on tomcat 7:
Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid.
The module has not been deployed.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
at
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
heres the contents in context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
I prefer to run wicket in eclipse as it negates the requirement to mess around with an external tomcat instance.
If you are comfortable with eclipse and maven i would download wicket 1.6 example archetype via maven, import into eclipse and then in the test directory you can run the run.java class to get an internal jetty server host wicket for you.
this should get you started quickly without having to wrestle with tomcat configurations too.
Not really an answer but an alternative route to the same end point
Add parameter path to context tag, same path that app will be served:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/application-path-name/">
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
Answer obtained from this question.
I have a very, very simple any build script:
<project name="quiz_jar" default="all">
<target name="all">
<jar destfile="/home/mike/export/quiz_all.jar" duplicate="preserve">
<archives>
<zips>
<files includes="/home/mike/export/quiz.jar" />
<files includes="/home/mike/download/jeuclid-3.1.9/repo/*.jar" />
</zips>
</archives>
<manifest>
<attribute name="Main-Class" value="com.antlersoft.quiz.ui.QuizFrame"/>
</manifest>
</jar>
</target>
</project>
It works fine when I run it as an Ant task in Eclipse (or from the command line)
However, in the Problems tab, it is marked with the following error:
Default target all does not exist in this
project
I found that if I change any character in the file (like in a path), the error flag goes away. I added a comment to make the error go away. Would still like to know what the problem was.
The closing tag </project> is missing. After adding it I get no errors or warnings in eclipse.
One problem is that you are not closing with a </project> tag, so Eclipse might not be seeing the <target>.
When I ran this from the command line I got a more informative message:
XML document structures must start and end within the same entity.
I was able to resolve this issue for myself by updating Maven. Right click on the project->Maven->Update Project.