I have a desktop application that uses BIRT. In the jar file I have a directory in resources's folder with the design and library files. Even they are in the same folder, when I run the application I get an exception showing that it can't find rptlibrary file:
Jan 31, 2013 11:29:33 AM org.eclipse.birt.report.model.core.LayoutModule loadLibrarySilently
WARNING: Syntax error found, and see error details.
Error.DesignFileException.SYNTAX_ERROR - 1 errors found!
1.) org.eclipse.birt.report.model.parser.DesignParserException (code = Error.DesignParserException.FILE_NOT_FOUND, message : The file "pdv.rptlibrary" is not found.)
If I change library tag in rptlibrary from:
<list-property name="libraries">
<structure>
<property name="fileName">pdv.rptlibrary</property>
<property name="namespace">pdv</property>
</structure>
</list-property>
to:
<list-property name="libraries">
<structure>
<property name="fileName">modelos_relatorio/pdv.rptlibrary</property>
<property name="namespace">pdv</property>
</structure>
</list-property>
it works but I got some errors when try to preview in eclipse, so, is there a way I can change this in code?
What do you set your resource folder to in the designer? This can be configured in the window->preferences.
You can configure it for the entire workspace or just for a specific project. If you are using the API in your application, you should be able to set a resource path in your EngineConfig or set a specific instance of the IResourceLocator interface which really just requires two methods called findResource be implemented. You can look at the org.eclipse.birt.report.model.util.ResourceLocatorImplBase class in the source for an example.
10 Years Later (French pronunciation)..
eclipse 2022.03 and BiRT 4.9.0
When you use eclipse/../preferences, don't type "report" to jump to the page cuz it will be not expandable (don't know why)
Whereas if as follows you just scroll to find it, you will do so
Finally I got the same problem regarding the not loading rptlibrary in eclipse & unit test (not webapp). This happened to me when I updated the birt tool to 4.9 Version. So, I just found that the path of the referenced library must be relative to my "src" folder (due to this preferences I have)
Related
I have a common project that I build and create a nuget package from, for consumption in my other applications.
The build process for the common project both creates a nuget package, deploys it to our private nuget repo and pushes the symbols to our internal symbol server.
In my "other applications", in this specific case an ASP.NET website, I pull in the nuget package from our repo but when I try to step into code in that assembly it just skips over it. I cleared my local symbol cache and as soon as I start debugging VS pulls in all the symbols from the symbol server so I know that bit is working.
Can anyone help me?
You need to publish Nuget package with symbols and refer to them using the Symbols under Tools->Options->Debugging->Symbols.
See HOW TO DEBUG A .NET CORE NUGET PACKAGE?
Other members also asked the similar issue before:
How to debug code in a nuget package created by me
Update:
Since you want to step into code in the assembly, you still need to provide the source code file in the NuGet package alongside the dll.
As we know:
A symbol is a file containing metadata that represent the link between
your original source code and the machine code that has been
translated by a compiler.
In the Microsoft world, a symbol is represented by a .PDB (Program DataBase) file. It is the heart of the debugging process because thanks to these metadata, the debugging tools are able to correlate the instructions executing in the application to the original source code and providing features like breakpoint or variable watchers.
So if you only provide the dll and .pdb file, you still not step into the code, you also need provide the source code, then add the source code to the Debug Source Files for the solution that references the package:
More detail on providing the source code:
If you're currently packaging without a Nuspec, you'll need to create a Nuspec, then add the pdb to the list of files in the lib folder and source file in the src folder. "NuGet spec" may be a useful command for generating the initial spec as defined in NuGet docs. Below is my .nuspec file, you can check it:
<?xml version="1.0"?>
<package >
<metadata>
<id>MyTestPackage</id>
<version>1.0.3</version>
<authors>Admin</authors>
<owners>Admin</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Package description</description>
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
<copyright>Copyright 2017</copyright>
<tags>Tag1 Tag2</tags>
</metadata>
<files>
<file src="bin\Debug\MyTestPackage.dll" target="lib\Net46" />
<file src="bin\Debug\MyTestPackage.pdb" target="lib\Net46" />
<file src="Class1.cs" target="src" />
</files>
</package>
More detail on add the source code to the Debug Source Files:
When you have a solution open, right click on Solution, select Properties...Common Properties...Debug Source Files, and add the root source directory for the relevant binary reference:
I want to be able to run Xamarin.Forms from source so I can set breakpoints etc in it. I want to do this primarily so I can see how things get called so I can better understand how it works in response to my use of it in my app. I don't want to do it in the final app, I'd just like to swap out the source version for the nuget package in the end. During development though I would like to see how it runs things to better understand how I can manipulate/override/implement different details.
So far I am close to getting it to compile with my project, but I get 2 build issues realated to Xamarin.Forms.Conrols.Issues I think they are just unit tests, but it stops the build.
/Users/username/github/Xamarin/Xamarin.Forms/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39636.xaml: Error: Object reference not set to an instance of an object (Xamarin.Forms.Controls)
And
/Users/username/github/Xamarin/Xamarin.Forms/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/PlatformSpecifics_iOSTranslucentNavBarX.xaml: Error: Object reference not set to an instance of an object (Xamarin.Forms.Controls)
Maybe there is a better way to run it from source and have it integrate with a project and I am just missing it?
These are the projects I have added to my project in a Solution Folder:
Maybe I am on the right path, maybe not. Currently I am only targeting iOS I have an Android project but I am not concerned with that at the moment, just trying to limit it to running on iOS. If that's an issue I can definitely change it. It shouldn't care about the Android parts if I am building for iOS only. Maybe it does?
... LATER ...
Ok tinkering some more I got it down to these packages:
When I right click on the solution folder and select: "Build Xamarin.Forms" the build succeeds. It only fails now with the following error when I try to build my app's Form's project:
/Users/username/github/Xamarin/MyProject/App.xaml.cs(13,13): Error CS0103: The name 'InitializeComponent' does not exist in the current context (CS0103) (MyProject)
I get 51 errors whenever it references anything inside Xamarin.Forms or when it's trying to access a x:Name in some XAML from the code behind.
Intellisense sees the method as well, in this case InitializeComponent so at least that seems to know about it.
Ok, I got it. Here's how I did it:
Clone the Xamarin.Formsrepo from github:
https://github.com/xamarin/Xamarin.Forms
The following applies to Xamarin.Forms 2.3.4.247
cd into the newly cloned repo and checkout that tag corresponding to Xamarin Forms v2.3.4.247:
$ git clone git#github.com:xamarin/Xamarin.Forms.git
$ cd Xamarin.Forms
$ git checkout 2.3.4-2
Add these projects into your project. I placed them in a new solution folder within the project in Visual Studio Mac. I was only concerned with iOS. It would be similar for Android, just adding those specific libs. To figure how the dependencies I just opened the Xamarin.Forms.sln file and check each project's references.
Xamarin.Forms.Platform
Xamarin.Forms.Core
Xamarin.Forms.Platform.iOS
Xamarin.Forms.Xaml
Xamarin.Forms.Build.Tasks
Xamarin.Forms.Xaml.Xamlc
Xamarin.Forms.Xaml.Xamlg
Next, update packages for Xamarin.Forms.Build.Tasks (Mono.Cecil is missing when you import this project. It has a little warning icon by it in the packages list UI)
Now cd to your project folder and copy the .nu* files from the Xamarin.Forms Repo:
$ ls -1
Xamarin.Forms
YourProject
$ cd YourProject
$ cp -r ../Xamarin.Forms/.nu* ./
Afterwards, in the following to csprojfiles (The forms project and the platform project):
YourProject/YourProject/YourProject.csproj
YourProject/iOS/SourceTest.iOS.csproj
file add the following <Import> at the bottom before </Project>:
<Import Project="..\.nuspec\Xamarin.Forms.targets" Condition="Exists('..\.nuspec\Xamarin.Forms.targets')" />
Note this is referencing the files we copied above.
Finally it's time to add the references in Visual Studio to both projects.
Forms Project
Platform Project
That's it. It should compile now and you can add breakpoints into Xamarin.Forms and see how things run. Be sure you added that <Import> node above to ALL csproj files using Xamarin.Forms. From the looks of it, It's responsible for triggering XamlC to process the XAML. When you install Xamarin.Forms from Nuget, it adds this for you. Also be sure you have copied the *.nu files mentioned above to the root of your solution directory.
Remember, once you are done tinkering and you decide to install the Nuget Xamarin.Forms package, you may need to undo some of the changes you made above. For example, check the csproj files to be sure the <Import> is only from the package install.
In case you get compiler errors, check the Xamarin project references. Here are the individual Xamarin related inter-project dependencies that I used to generate the project reference list above.
Xamarin.Forms.Core
References
Xamarin.Forms.Platform
Xamarin.Forms.Platform
References
None
Xamarin.Forms.Platform.iOS
References
Xamarin.Forms.Core
Xamarin.Forms.Xaml
References
Xamarin.Forms.Core
Xamarin.Forms.Xaml.Xamlc
References
Xamarin.Forms.Build.Tasks
Xamarin.Forms.Xaml.Xamlg
References
Xamarin.Forms.Build.Tasks
Xamarin.Forms.Build.Tasks
References
Xamarin.Forms.Core
Xamarin.Forms.Xaml
In addition to AJ Venturella's answer, you also need in 2022:
...
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
<Import Project="..\..\.nuspec\Xamarin.Forms.props" />
<Import Project="..\..\.nuspec\Xamarin.Forms.DefaultItems.targets" />
<Import Project="..\..\.nuspec\Xamarin.Forms.DefaultItems.props" />
</Project>
Open .nuspec\Xamarin.Forms.nuspec and check the content that targets "build". It's what's above.
I'm using Intellij IDEA Community 2016.3 with the golang plugin.
Recently within Intellij I created a new package then I tried to create a new go file in that package. Intellij gave me a template error message, something like this:
Unable to parse template "Class" Error message: This template did not produce a Java class or an interface - during New -> Java Class
(To create the file I right-clicked the package and selected New > Go File.)
I then went into the file system and manually created the file. After a brief pause, Intellij closed the pane on the left that lists all my packages. Intellij also corrupted the project such that I was not able to view the project pane again.
I recreated the project and everything seems to be fine now but I don't want to have to do all that again each time I create a .go file.
I don't know if this makes a difference, but the package I tried creating the file in is a download from github. Intellij has been telling me this:
The directory C:\go-workspace\src\gopl.io is under Git, but is not registered in the Settings.
It's someone else's project -- files for learning go-- and I don't plan on sending any pull requests. I simply created the package and file there because they are part of learning go.
How do I create .go files in Intellij?
Added 21-Jan:
Here are my project settings:
Make sure you got the Go setup properly before continuing.
Next I'd also make sure the plugin setup is good(maybe reinstall after making sure your go setup is ok), such as the project SDK is set to something Go and not Java as that's usually the default(see image below) and IntelliJ can detect your GOPATH.
If the project your'e working on was not an IntelliJ module before and you just opened it, make sure the .iml file is a Golang module (IntelliJ usually asks you to do this automatically if it's not already done, but you need to setup the project SDK to Go first I assume)
ie.(my hello.iml);
<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="GOPATH <hello>" level="project" />
</component>
</module>
Here is a comprehensive step by step guide for a starter setup;
https://rootpd.com/2016/02/04/setting-up-intellij-idea-for-your-first-golang-project/
I installed the VS2010 web publishing updates yesterday, and now whenever I try to load a WiX setup project (all showing as unloaded in solution explorer) I'm getting the error:
The imported project "PROJECTNAME.wpp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.5\Web\Microsoft.Web.Publishing.targets
Where PROJECTNAME is the path to my setup wixproj file, without the .wixproj extension. I've checked through the project file and there is no reference to a wpp.targets file anywhere. I decided to try and create a blank targets file in that location and so added one with just this in it:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
But got exactly the same error - a not found exception despite the file being there!
I then dug into the Microsoft.Web.Publishing.targets file and had a look for any ".wpp.targets" text, which gave me this:
<PropertyGroup Condition="'$(EnableWebPublishProfileFile)'=='true' And
'$(WebPublishProfileFile)' != '' And Exists($(WebPublishProfileFile)) ">
<WebPublishProfileCustomizeTargetFile Condition="'$(WebPublishProfileCustomizeTargetFile)'==''">
$([System.IO.Path]::ChangeExtension($(WebPublishProfileFile), '.wpp.targets'))
</WebPublishProfileCustomizeTargetFile>
...
So that looks to be setting up a filename of PROJECTNAME.wpp.targets, but only when the EnableWebPublishProfileFile property is set to true. I added this to my wixproj file's main propertygroup:
<EnableWebPublishProfileFile>False</EnableWebPublishProfileFile>
Again though, it made no difference at all to the error. I'm running out of ideas here now!
Further update
I've been trying to repo this on a blank project (so far without success), and the messing about has narrowed the error down to this line (186) in the Microsoft.Web.Publishing.targets file:
<Import Project="$(WebPublishPipelineCustomizeTargetFile)"
Condition="'$(WebPublishPipelineCustomizeTargetFile)' != ''"/>
This is set at the top of the file:
<WebPublishPipelineCustomizeTargetFile
Condition="'$(WebPublishPipelineCustomizeTargetFile)'==''">
$(WebPublishPipelineProjectDirectory)\*.wpp.targets
</WebPublishPipelineCustomizeTargetFile>
I'm not sure how this is getting changed to PROJECTNAME.wpp.targets though?
I tried overriding this in my project file, but once again, it makes no difference at all.
Next I added an Exists() condition to the line in the targets file, now some projects are working and others are not, instead failing (on build) with the error:
The "DisableEscapeMSBuildVariable" parameter is not supported by the "ImportParametersFile" task. Verify the parameter exists on the task, and it is a settable public instance property.
My journey continues...
I experienced the same issue when trying to open a standard web project.
The proj file was referencing the following import for v10.0 targets but throwing the import error in the question which referred to v10.5 targets.
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" />
The same was true when I referenced a hard coded path - I still got v10.5 error
My solution was to simply back up and remove that version located at:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\10.5
I'm really not sure what other programs and projects need this version or why import paths were not followed but it go this project open for me seeming falling back to the correct version.
I'm trying to make a subdirectory in an MS Deploy package writable to the application pool user. Thanks to a helpful post about the setAcl provider by Kevin Leetham I was able to get most of what I need into my project file:
<MsDeploySourceManifest Include="setAcl"
Condition="$(IncludeSetAclProviderOnDestination)">
<Path>$(_MSDeployDirPath_FullPath)\doc\public</Path>
<setAclAccess>Read,Write,Modify</setAclAccess>
<setAclResourceType>Directory</setAclResourceType>
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
</MsDeploySourceManifest>
Note that I've added "\doc\public" to the root deployment directory. In the resulting manifest that VS2010 builds, I see the following setAcl element:
<sitemanifest>
<contentPath path="C:\Source\...\obj\Debug\Package\PackageTmp" />
<setAcl path="C:\Source\...\obj\Debug\Package\PackageTmp"
setAclResourceType="Directory" />
<setAcl path="C:\Source\...\obj\Debug\Package\PackageTmp"
setAclUser="anonymousAuthenticationUser"
setAclResourceType="Directory" />
<setAcl path="C:\Source\...\obj\Debug\Package\PackageTmp\doc\public"
setAclResourceType="Directory"
setAclAccess="Read,Write,Modify" />
</sitemanifest>
That last line looks good: it's appended the subdirectory I want to be writable, and the access modifiers all seem to have transferred over well enough.
However, when I deploy this package I receive an error:
Error: A value for the 'setAclUser' setting must be specified when the
'setAcl' provider is used with a physical path.
This is a confusing error because I'm not trying to set an ACL on a physical path, exactly, but a subdirectory of a web application. Looking at the output of MS Deploy, it's easy to see the problem:
Info: Adding setAcl (REST Services\1.0.334).
Info: Adding setAcl (REST Services\1.0.334).
Info: Adding setAcl (C:\...\obj\Release\Package\PackageTmp\doc\public).
MS Deploy is apparently substituting the web application name for my absolute path "C:...\obj\Release\Package\PackageTmp", but when I append "\doc\public" to that absolute path it no longer recognizes it as a web application directory. This exact problem is described by another victim over on the ASP.NET forums without any resolution.
Does anyone know how to set an ACL on a particular subdirectory of a web application via Web Deploy without manually identifying the physical path and application pool user on the target host?
OK let me first say that this is way harder than it should be!
I think the reason why it is failing is because when you are publishing it cannot recognize the folder as being a folder in the IIS Application. The reason this is happening is because the full path is being transferred to the destination when the SetAcl provider is invoked. Instead of that we need an path which is relative to the IIS Application. For instance in your case it should be something like : "REST SERVICES/1.0.334/doc/public". The only way to do this is to create an MSDeploy parameter which gets populated with the correct value at publish time. You will have to do this in addition to creating your own SetAcl entry in the source manifest. Follow the steps below.
In the same directory as your project create a file with the name {ProjectName}.wpp.targets (where {ProjectName} is the name of your Web application project)
Inside the file paste the MSBuild content which is below this list
Reload the project in Visual Studio (VS caches the project files in memory so this cache needs to be cleared).
{ProjectName}.wpp.targets
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="SetupCustomAcls" AfterTargets="AddIisSettingAndFileContentsToSourceManifest">
<!-- This must be declared inside of a target because the property
$(_MSDeployDirPath_FullPath) will not be defined at that time. -->
<ItemGroup>
<MsDeploySourceManifest Include="setAcl">
<Path>$(_MSDeployDirPath_FullPath)\doc\public</Path>
<setAclAccess>Read,Write,Modify</setAclAccess>
<setAclResourceType>Directory</setAclResourceType>
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
</MsDeploySourceManifest>
</ItemGroup>
</Target>
<Target Name="DeclareCustomParameters" AfterTargets="AddIisAndContentDeclareParametersItems">
<!-- This must be declared inside of a target because the property
$(_EscapeRegEx_MSDeployDirPath) will not be defined at that time. -->
<ItemGroup>
<MsDeployDeclareParameters Include="DocPublicSetAclParam">
<Kind>ProviderPath</Kind>
<Scope>setAcl</Scope>
<Match>^$(_EscapeRegEx_MSDeployDirPath)\\doc\\public$</Match>
<Value>$(_DestinationContentPath)/doc/public</Value>
<ExcludeFromSetParameter>True</ExcludeFromSetParameter>
</MsDeployDeclareParameters>
</ItemGroup>
</Target>
</Project>
To explain this a bit, the target SetupCustomAcls will cause a new SetAcl entry to be placed inside of the source manifest used during publishing. This target is executed after the AddIisSettingAndFileContentsToSourceManifest target executes, via the AfterTargets attribute. We do this to ensure that the item value is created at the right time and because we need to ensure that the property _MSDeployDirPath_FullPath is populated.
The DeclareCustomParameters is where the custom MSDeploy parameter will be created. That target will execute after the AddIisAndContentDeclareParametersItems target. We do this to ensure that the property _EscapeRegEx_MSDeployDirPath is populated. Notice inside that target when I declare the value of the parameter (inside the Value element) that I use the property _DestinationContentPath which is the MSBuild property containing the path to where your app is being deployed, i.e. REST Services/1.0.334.
Can you try that out and let me know if it worked for you or not?
FYI - this does work for a root website if you follow the convention specified in the post here:
http://forums.iis.net/p/1176955/1977169.aspx#1977169
<Match>^$(_EscapeRegEx_MSDeployDirPath)\\#(CustomDirAcl)$</Match>
<DefaultValue>{$(_MsDeployParameterNameForContentPath)}/#(CustomDirAcl)</DefaultValue>
<Value>$(_DestinationContentPath)/#(CustomDirAcl)</Value>
This post also has the benefit of being able to specify a block of subdirectories in a single ItemGroup.